In the Appalachian firefly Photinus carolinus, flying males flash in synchrony with their neighbors, creating a symphony in light. Photo by Radim Schreiber.

Sara Lewis studies fireflies. And it turns out they’re not just a pretty flashing light on a summer night. She explains how a firefly glows — and how humans are harnessing that glow for health and medical research (and even to make our food safer).

The silent sparks of fireflies seem so magical, yet their lights arise from a carefully orchestrated chemical dance that takes place inside the firefly lantern. Luminous beetles — fireflies among them — head up the roster of terrestrial creatures that have learned the trick of transforming chemical energy into light (others include some fungi, earthworms, millipedes and fungus gnats). On land, bioluminescence has evolved independently at least 30 separate times, and many more light-producing animals inhabit the sea. All these luminous creatures have come up with many different chemical systems to make their lights.

Confusingly, this biochemical diversity gets hidden because scientists use the generic name luciferase (from the Latin lucifer, “light bearer,” + –ase, the suffix attached to all enzymes) to refer to any enzyme that catalyzes light production. Yet though they each catalyze a similar chemical reaction, the luciferases used by different creatures can vary substantially in their structure.

Each luciferase consists of a large protein with a particular three-dimensional shape that allows it to coax its dance partner, always a much smaller molecule, into emitting light. These smaller molecules are collectively known as luciferins, and they’re what actually produce the light that we see. All luciferins hail from the same general class of chemical compounds; they each possess several linked rings that mix carbon, nitrogen and/or sulfur in various combinations. Luciferin’s special talent lies in its ability to trap chemical energy in the bonds between these rings. Gently manipulated by its luciferase partner, luciferin harnesses this energy to give off light.

The food industry has long used fireflies’ light reaction to detect good food gone bad.

Firefly light isn’t just useful to fireflies. Before electricity, of course, firefly light had many uses. I’ve heard oldsters around the world tell stories about gathering fireflies to use at night for reading, for biking and for walking along forest paths. But scientific discoveries about the chemistry behind firefly bioluminescence have paved the way for even wider practical applications. Fireflies’ light-producing talent has provided invaluable tools for improving public health, for facilitating innovative research, and for advancing medical knowledge.

The food industry has long used fireflies’ light reaction to detect good food gone bad — that is, food that’s contaminated by noxious bacteria and thus unsafe for human consumption. Test kits containing firefly luciferase and luciferin are used to detect the presence of ATP, a compound that’s found in all living cells; this includes any live microbes like salmonella or E. coli that might be lurking in our food. When firefly luciferase and luciferin are added, the ATP from these microbial contaminants produces visible light. The more ATP, the brighter the light, so the intensity of luminescence even reveals how many bacteria are present. Starting in the 1960s, this bioluminescent test has been able to detect even tiny amounts of microbial contamination, using very sensitive instruments to measure light production. This firefly-inspired test provides results more quickly than previous methods; it requires mere minutes instead of the days needed to detect contaminated food by growing bacterial cultures. This handy bioluminescent ATP assay, which now employs synthetic luciferase, is still widely used to ensure food safety by detecting microbial contamination in milk, soft drinks, meat and other commodities.

Similar methods now aid drug discovery in the pharmaceutical industry, which relies on high-throughput screening to rapidly test potential new chemotherapies for treating cancers. Tumor cells are grown in culture and then treated with different drugs. Using luminescence-based tests to measure cell viability, those drugs most effective at killing tumor cells can be quickly identified.

Since the genetic blueprint for luciferase was isolated and deciphered in the 1990s, the number of practical uses for firefly bioluminescence has skyrocketed. Many new discoveries in medicine and biotechnology have been made using luc, the firefly luciferase gene, as a “reporter” for the activity of other genes. In this application, researchers splice the luc gene together with a specific gene they want to study, and then insert this spliced DNA into living cells. Whenever the spliced DNA gets transcribed, the cells will manufacture luciferase. When luciferin is added, these cells will respond by lighting up. This technique has been used, for instance, to find out exactly when and where specific plant genes get turned on. To learn about particular genes regulating plant growth, biologists have spliced the luc gene into different bits of plant DNA. When plants are sprayed or fed with luciferin-containing water, the leaves will glow whenever luc gets turned on. This allows researchers to identify specific genes regulating plant growth at different times and locations. Such reporter genes have also provided powerful tools for studying diseases, for developing new antibiotic drugs and for gaining new insights into many human metabolic disorders.

We humans can benefit greatly from evolution’s natural inventiveness.

Fireflies have also helped scientists develop real-time, noninvasive imaging to see what’s happening inside living organisms. When luc genes are used to label particular cell or tissue types, very sensitive cameras can be used to detect their light inside the live animal. By labeling cancer cells in mice, scientists have identified new anticancer drugs that halt tumor growth and reduce the likelihood of cancer metastases. Related methods have helped find new drugs that can be used to combat tuberculosis. The bacterial pathogen responsible for this disease has evolved resistance to even our most powerful antibiotics, and thus the disease been difficult to eradicate. To help discover new treatments for antibiotic-resistant tuberculosis, scientists have infected mice with luciferase-labeled tuberculosis bacteria. They then treat the mice with various antituberculosis drugs and use bioluminescence imaging to monitor the bacteria inside.

All these advances in public health, medicine, and scientific research were made possible by scientific discoveries about the biochemistry of firefly light production. This list goes on and on. And it goes to show just how much benefit we humans can derive from evolution’s natural inventiveness.

This is an edited excerpt from Silent Sparks: The Wondrous World of Fireflies by Sara Lewis. © 2016 Sara Lewis. Published by Princeton University Press. Reprinted by permission.