They are good in that they help break stuff down but bad if indoors because they will eventually mature and fly out of there.
Here is a page you can find more info at.
http://forums2.gardenweb.com/discussions/1669281/what-is-this-in-my-compost-bin
If it is soldier fly larvae then here is what I found on wikipedia.
Black soldier fly larvae and redworms[edit]
Worm farmers often get larvae in their worm bins. Larvae are best at quickly converting "high-nutrient" waste into animal feed.
[15] Redworms are better at converting high-
cellulosematerials (paper, cardboard, leaves, plant materials except
wood) into an excellent
soil amendment.
Redworms thrive on the residue produced by the fly larvae, but larvae
leachate ("tea") contains
enzymes and tends to be too acidic for worms. The activity of larvae can keep temperatures around a 100°F, while redworms require cooler temperatures. Most attempts to raise large numbers of larvae with redworms in the same container, at the same time, are unsuccessful. Worms have been able to survive in/under grub bins when the bottom is the ground. Redworms can live in grub bins when a large number of larvae are not present. Worms can be added if the larval population gets low (in the cold season) and worms can be raised in grub bins while awaiting eggs from wild black soldier flies.
As a feeder species, BSFL are not known to be
intermediate hosts of
parasitic worms that infect poultry, while redworms are host to many.
[16]