A not uncommon experience with home worm farms is lifting the lid to discover a writhing mass of maggots, usually white in colour with a segmented body. Whilst your initial reaction may be one of horror and disgust it is nowhere near as bad as it looks!! Most likely they are the larvae of the soldier fly and they play a fairly positive role in the composting process in that they eat rotting organic matter in much the same way earthworms do. They just like a much wetter environment than earthworms.
These larvae are the progeny of a benign insect called the soldier fly which is a common inhabitant of kitchen areas particularly. The scientific name for these interesting insects is Hermetia illucens and they are a common inhabitant of compost heaps, manure piles as well as worm farms. They perform much the same role as tiger and red worms in that they eat dead organic materials and recycle the nutrients from them. They are not generally harmful to humans but their presence in a worm farm is not ideal as the conditions that suit them are not optimal for your worms. They tend to exude acidic substances that are detrimental to earthworms and they prefer very moist conditions.
It is my experience that soldier fly maggots appear when the contents of your worm farm become too wet (often when too many moist kitchen scraps are added in one go) or too acidic, or both. They can also appear in compost heaps if they contain lots of kitchen scraps or other organic waste.To tip the balance back in favour of your earthworms, mix in a coarse fibrous material such as shredded newspaper or lucerne hay with moist materials. Also, a sprinkle of garden lime (or Tumbleweed Worm Farm and Compost Conditioner) will neutralise any build up of organic acids.
There is a whole variety of organisms such as mites, frogs, flies, spiders and even snakes that will be attracted by the composting process. The challenge is to keep the environment such that your earthworms thrive!