I believe the answer you are looking for is an exergonic reaction; it explains that some form of energy (light) is given of by the chemical reactions which make it glow.
pie
the sun maintain its energy output by nucler fusion
Input energy = output energy + losses
Output force
Watts is energy output. Watts is joules per second. Joules is energy.
The reaction that makes a firefly glow in terms of energy is referred to as exergonic. This would be an output.
It is the opposite of an exergonic reaction. An energonic reaction would be one where more energy is put into the reaction than what comes out of it (like endothermic), while exergonic has more output energy than input (like exothermic).
The energy input is always greater than energy output.
pie
the sun maintain its energy output by nucler fusion
Input energy = output energy + losses
The result (ratio) of such a comparison is called the efficiency. Note that total energy output must be equal to energy input (conservation of energy); however, what is relevant for this comparison is the useful energy output.
Output force
Watts is energy output. Watts is joules per second. Joules is energy.
You divide useful output energy by the input energy. Or equivalently, useful output power by input power.
Efficiency = ( useful energy output / total energy input ) x 100
energy