The light generated by bioluminescent beings is usually blue, with marines emitting light with a wavelength of 550 nanometers (nm) and fireflies emitting light with a wavelength of 510 to 660 nm. And the base is always the same, whether it's in bacteria like Vibrio fischeri, phytoplankton dinoflagellates like Noctiluca scintillans, terrestrial fireflies, or deep sea shrimp like Acanthephyra purpurea. These aliens have created a chemical reaction. To do so, they contain a chemical called luciferin that, in the presence of oxygen and using ATP in the cells (which is what provides energy to any biological response), oxidizes the molecule through the action of an enzyme called luciferase. Oxidation excites the luciferin, which then emits light when it returns to its usual energy level.
That is, luciferin is the molecule, luciferase is the enzyme (molecule that enables chemical reactions in cells), and both oxygen and ATP are used. For a variety of circumstances, the luciferin oxidation reaction is triggered. It could be a stress reaction. It is due to agitation in the case of phytoplankton, for example. When we see light in the waves, it's because the agitation generated by the water's movements causes the phytoplankton to react. When it comes to animals, it can be in response to an attack or as a protective mechanism to frighten away a predator. It's also to attract their partners in the case of fireflies. In other words, bioluminescence has a variety of biological functions, but the chemical process that causes it is always the same.
The light created by fireflies, for example, is self-generated. It is owing to a symbiosis between deep-sea fish and some types of bioluminescent bacteria in the case of deep-sea fish. The reaction does not take place within the fish, but rather within a vesicle in which bioluminescent bacteria collect, and the fish use the bacteria's light output for their own purposes. To entice prey in most circumstances. In an extremely dark environment like the abyssal, they open their jaws, and the light attracts other smaller fish that serve as food.
These beings, as I previously stated, utilise bioluminescence for biological functions. They switch on or off when they need to, in response to a stimulus that varies depending on the species. They don't emit light all of the time; just when the stimulus that causes the luciferin reaction appears. This is because, because they consume ATP, producing light requires a significant amount of energy. That is why they do not remain "on" throughout the day. They must employ it in a metabolically advantageous manner.
The bioluminescence of several of these species is economically exploited. In the presence of contaminants, the bacterium Vibrio fischeri, which is a marine bacteria, changes its amount of light emission. And it's because of this trait that biotechnological tests using this bacterium to evaluate the presence of hydrocarbons in water or glyphosate, a herbicide, in the terrestrial environment are now for sale.