In fireflies, this chemical reaction takes place in a luminescent gland located in the bottom of the insect's abdomen. The flash is triggered when oxygen is breathed in through a sort of mouth located in the abdomen and combines with the luciferin, to create an inactive substance called oxyluciferin. As the luciferin oxidizes, energy is released in the form of light. The Birds and the Bees Mature fireflies use these flashes of light to find and attract fireflies of the opposite sex. In most species found in North America, the male bugs flash while flying.
Females do their flashing closer to the ground, usually while hanging out in bushes or grass.
Firefly larvae also produce bioluminescence, although no one knows for sure why. There are some predatory species in which the female imitates that flash of other firefly species, luring unsuspecting males to an untimely demise. Bioluminescence is an incredibly efficient process. The chemical reaction converts nearly 100 percent of the available energy into light. Your average light bulb is not nearly as proficient, managing to turn about 10 percent of the available electricity into light, with the rest wasted as heat.