Bioluminescence
Bioluminescence has appeared many times during evolution. The capacity to produce light is an extension of normal metabolism: all chemical reactions produce a few photons. Visible light is produced when the photon production increases. In the case of bacteria, the original function of the reaction was probably to detoxify excessive oxygen.