Most bioluminescent organisms in the ocean produce blue-green light, the color that transmits best through ocean water. Animals living on the bottom tend to have bioluminescence shifted toward green, which transmits best in the murkier water. Some worms and an octopus even produce yellow bioluminescence. Most unusual is the red bioluminescence of some deep-sea fishes such as dragonfish. Unlike the blue-sensitive eyes of most deep-sea animals, the dragonfish eye can see red light. Thus the red bioluminescence of dragonfish serves as an invisible flashlight or sniperscope to illuminate prey, which wouldn't even detect the light shining on them!
The color of bioluminescence is based on the structure of two molecules involved in the chemical reaction that produces the light – luciferin, which is oxidized to release the energy that comes out as light, and luciferase, the protein that helps facilitate the reaction. There are several dozen types of luciferin–luciferase chemical reactions, but only a handful have been fully characterized. Some animals don't even make their own luciferin but get it from their diet.
The chemical reaction of bioluminescence is used as a tool in research. For example, suppose you are interested in the activity of a gene that makes a certain protein. You can introduce the gene for luciferase so that when your gene of interest is turned on and is making the protein, it also makes luciferase – just add luciferin and you get light when the gene is active. The structures of luciferin and luciferase can be altered to produce different colors of light to serve as a rainbow of research tools. So the chemistry of bioluminescence has both ecological and research uses.
-- Michael Latz, research biologist, Marine Biology Research Division