Reproduction
The question many of us have always had is why exactly do fireflies (or lightning bugs) flash? The answer is simple; they do it to attract a mate/partner (Lewis & Crastley, 2008).
The male firefly often initiates the mating ritual by flashing a sequence of signals to a female that is nearby(Lewis & Crasley, 2004). The brightness and and size of the flash often matter as much as the sequence itself..... That's right, size does matter to a female firefly. If the female likes what she sees she flashes back another series of lights, signaling the male that she is ready to mate (Crasley, 2004).
Once the male and female get together, and the mating is done, the female will lay her fertilized eggs in the soil. Four weeks later the eggs hatch and the larvae stage appears. These larvae also posses the ability for bioluminescence, but for an entirely different reason. These larvae (often referred to as glow worms) flash to warn predators that they are toxic and should not be eaten.
About three months after the larvae hatch they dig small tunnels into the soil where they stay until they pupate into mature adult fireflies. Once they have reached maturity and emerge from the soil their lifespan is between three and four months, in this time they will find mates and lay eggs, thus the cycle begins all over again.
Larval stage of firefly (glow worm)