Light as a Product
The production of light in organisms is called bioluminescence. The effect occurs when the enzyme luciferase chemically reacts with the substrate luciferine, where adenosine triphosphate (a molecule referred to as ATP that transports energy in cells) and oxygen are present. This reaction produces oxyluciferin, carbon dioxide and light.
Frequency and Color
The level of ATP used in the reaction causes variation in the rate of flashing by the firefly. Differing levels of acidity in the atmosphere cause the light emitted to vary between the colors white, yellow, red and green.
Warning Signal
Bioluminescence occurs in fireflies throughout all stages of the insect's life, from larva through adulthood. During the larval and adult stages, bioluminescence is used as a warning signal to predators. The effect indicates to the predator the distastefulness or toxicity of the insect.
Mating Signal
As the firefly matures, the light serves two purposes. It acts as a warning device to repel predators, as in the larval stage, and also as a mating signal. Variations in color and frequency of flashing light are used to communicate between male and female fireflies. The males, which are mobile, flash at least once, attracting the attention of the sedentary female, who answers the male with at least one flash in return.
Predation
The female firefly is carnivorous and will use bioluminescence to attract prey to her position. One example is the species Photuris. Nicknamed "femme fatale fireflies," they are known for attracting male fireflies of different species by copying their flash patterns, signaling them to come close for mating. When this occurs, the "femme fatal firefly" consumes the male.