Glow-worms and fireflies both belong to a special group of luminous beetles (Coleoptera: Lampyridae). This light is produced in specialized cells of their light organs, where a special biochemical reaction takes place. Light produced by organisms is called bioluminescence. Worldwide, there are over 2000 firefly and glow-worm species and new species are still being discovered, even today. The difference between fireflies and glow-worms lies in the mere fact that fireflies are the winged forms capable of flight, whereas glow-worms represent the wingless and thus flightless members of the Family. A bit confusing is that the name glow-worm also refers to other insect groups, depending on the location in the world: in Europe glow-worms are lampyrids, but in the Americas this name refers to another luminescent beetle group (Phengodidae) and in Australia and New-Zealand it refers to the glowing larvae of fungus gnats, Arachnocampa spp. (Diptera: Keroplatidae). So we have to be careful and distinguish between European, American and Australian glow-worms.
Fireflies and glowworms demonstrate their light displays especially at night. But why do they disclose their presence and why would they make themselves vulnerable to possible enemies?
Well, adult fireflies "speak" with a language of light, and depending on the species it is either the male that flashes a species-encoded love-call in the hope of getting a flashy answer from a female, or in glow-worm species, it is the female that tries to draw the attention of overflying males by a brilliant glow. Also the immature stages (larvae, pupae and even the eggs) are capable of light production. The light displays are also used to deter their enemies, either by frightening or by signalling that they are defended by toxic chemicals or a bad taste. This last tactic is called bioluminescent aposematism.
Many firefly species have diurnal adults that use "chemical communication" with scents (pheromones) instead of "visual communication" by bioluminescent displays. The males of such diurnal species often bear larger or elaborate antler-like or plumose antennae and they are often non-luminous as adults. Yet, all known lampyrid species seem to have glowing larvae..
Firefly larvae are predators and spend several months (tropics), up to one to three years (temperate regions) in order to develop. Most species hunt for snails and slugs, others for earthworms. Some species are less specialised and attack any small and soft invertebrate, or even kin. Adults of most species do not feed and seem to be short lived, from one to several weeks, but some species feed on nectar, plant saps and in the Americas there are even species (e.g. Photuris spp.) that hunt for other fireflies in order to obtain defensive toxins they cannot fully metabolise themselves. The females of such aggressive species even imitate the female flash codes of the other species in order to mislead, attract and devour the males of the better defended species.