On one level, we have fireflies figured out. We know the enzyme they use to make light (called luciferase), as well as the chemicals they use in the light-generating reaction. We know them so well that we've turned them into useful tools for studying other aspects of biology, such that lots of people who have never even seen a firefly have used firefly luciferase in the lab.
But on another level, there's a lot we don't understand. Fireflies clearly exercise a level of control over when they light up, and they do so only in specialized organs. And there's nothing like that organ in other species. So, somehow, fireflies evolved an elaborate light-producing organ, and there's no sign of any potential precursors in related species. Which makes it a bit of a mystery.
Now, a pair of researchers from Wuhan, China, (Xinhua Fu and Xinlei Zhu) have started unraveling what's going on at the level of the genes responsible. And, while they haven't produced a complete picture of how evolution built the fireflies, they've brought us a lot closer.
Following the light
We know a fair bit about how fireflies produce light. First off, it's not limited to the adults we're familiar with. The larval stages also light up, and it's thought that this is a way to signal their toxicity to potential predators. One idea is that this was how the light-emitting system initially evolved, and it was later adapted for mating.
In any case, the adult organs form in specific segments of the beetle's abdomen (they form in different segments in males and females). They include a transparent cuticle on the exterior of the insect and specialized light-emitting cells underneath it.
Within those cells, the luciferase enzyme is sent into a compartment called the peroxisome, where various chemicals are normally broken down through oxidation reactions. On the simplest level, this makes sense because the reaction luciferase catalyzes involves oxygen. But there are some indications that the peroxisomes of the light-producing cells are specialized for that and may no longer be able to perform all the other functions of peroxisomes.
One of the easiest ways to study novel features like this is to identify the genes involved in producing them. Here, genetics doesn't work especially well, as fireflies are very difficult to breed in the lab. Another option is to sequence the genome of fireflies and their relatives and look for newly evolved genes or existing genes that have undergone duplications so that there are extra copies. This has been tried in fireflies, and some potentially interesting genes have been identified. But none of these seem to have anything to do with making light.