Catalysis of the generalized reaction: luciferin + O2 = oxidized luciferin + CO2 + light. There may be additional substrates and reactants involved in the reaction. The reaction results in light emission as luciferin returns to the ground state after enzymatic oxidation.