I would have to say that fruit flies are the most common bug that finds a worm bin. As with most of the 'bin creatures' they don't bother the worms, just us. Left unchecked a fruit fly population can get out of hand and you will have to call in air traffic control just to feed your worms! Fortunately there are several things you can do to cut down a fruit fly population quickly.
1) The first thing you can do is cut back on your feeding. Very often I find that bins have been overfed causing a surplus of food that worms have not been able to keep up with. If you hold off for a few days and let the worms catch up there will be less food for the flies to be attracted to.
2) A second thing you can do is add more moist shredded paper to the bin (like another 4 to 6 inches). This will reduce the 'fly zone' so the adult flies can't find a mate and they will have to dig a lot deeper to find the food, if they find it at all.
3) Third you can add a 'flytrap' to the bin. After you put in the paper you can make a flytrap out of a small jar or cup of any kind. I have used baby food jars, yogurt containers or an old coffee mug. Fill the jar 3/4 full of apple cider vinegar and add a drop of dish soap. Put this into a corner of the bin, nested in the paper, and the flies will go in and never come out. If you make two traps you could put one in the bin and one on top so any adults flying around outside of the bin will get caught. This would also work if you find you have fruit flies in your house.
4) The last thing you can do is physical removal... smash the adults you see crawling, let them out and shoo them away from the bin and the food or pull out the vacuum and suck them up. Their life cycle is so short that if you cut off their food and breeding with the extra paper and open the bin twice a day to let the adults out and smash what you can you will seriously cut down the population in just a few days.
To keep them away make sure the worms are keeping up with the food you are giving them. If the food you are adding to the bin isn't almost completely gone in 3 days or so hold back some food so they can catch up and there won't be so much temptation for fruit flies. Also make sure you are burying the worm's food under plenty of moistened paper.
If you have a tray system all of this advise could work for you with possibly one more trick. Tray systems generally don’t have much open space above the feeding area like a bin type of system. If you have a tray system try placing a sheet of moistened paper over the food. Since with tray systems adding 4 to 6 inches of shredded paper is not an option one impenetrable layer could help a lot.