Glowworms are the larval stage in the life of an insect called the fungus gnat. Although they are most spectacular in caves, glowworms are also quite common outside - they can be found wherever conditions are damp, food is in good supply and there is an overhanging wall. The scientific name of the New Zealand species is Arachnocampa luminosa. Similar glowworms can be found in the south-east of Australia.
The New Zealand glowworm is one of many creatures that naturally produce light (bioluminescence). The light is the result of a chemical reaction that involves several components: LUCIFERIN, a waste product; LUCIFERASE, the enzyme that acts upon luciferin; ATP, adenosine triphosphate, the energy molecule; and oxygen. These combined form an electronically excited product capable of emitting a blue-green light.
The light is used to attract insects, brought into the cave in the rivers, which the glowworm catches and eats. If a glowworm is hungry its light will shine a little brighter and is even more effective. When the female glowworm reaches the adult stage the light is used to attract males for mating.
Four stages are involved in the life cycle of the glowworm; the egg changes to larva, then to pupa, and finally to the adult fly (which lays more eggs). The entire cycle takes 10-11 months to complete, most of which is spent in the larval stage.
The eggs are laid by the adult, and hatch into larvae about three weeks later. They are creamy-brown balls, less than a millimetre across, and are sticky enough to hang onto walls, overhangs and cave ceilings.
The larva is the most familiar form of the fungus gnat. Starting a few millimetres long, it slowly grows to the shape and size of a matchstick - after which it is ready to grow into a pupa. The larva stage is usually 6-9 months, depending on the availability of food. However, the glowworm can survive for long periods without eating.
Because the other stages don't feed, the larva must store enough energy to nourish the later stages of the life cycle (and the eggs of the next generation if it is a female). The glowworm displays a bright blue-green light throughout the larval stage to attract its food.
The pupal stage is like the cocoon stage of a moth's life, as the simple body of the larva is changed into the complex adult. The larva first rearranges its sticky threads into a circular protecting barrier, then hangs in the middle of the circle and encases itself in a pupal "skin". A little less than two weeks later it emerges as an adult gnat.
The adult fungus gnat wriggles out of the pupal skin and spends its first few hours drying, until it is able to fly. It has no mouth, cannot feed, and therefore lives only a few days. During this time mating takes place. Soon after mating the female starts laying her eggs, usually in several clumps of 40-50. As they are laid one at a time, the egglaying can take a whole day, after which the female dies.
The larva is the only stage of the life cycle at which the species eats - as an adult it has no mouth. To feed, the glowworm hangs down dozens of sticky threads which are used to trap any insects which fly towards the light. When an insect is caught in the threads, the glowworm senses the vibrations and hauls in its victim - at the same time chemicals in the thread paralyze the insect. When the thread has been pulled up the glowworm bites the insect and kills it, then either sucks out the juices or eats the entire body.
Glowworm prey include midges, mayflies and caddis flies. In caves these insects breed on the mud banks beside streams, or fly in accidentally. Adult glowworms are occasionally caught and eaten as well. (TEXT FROM HERE)
Literature review of the New Zealand glowworm Arachnocampa: Ento.org.nz