The production of light by means of a chemical reaction in an organism.