Answer is: When an electron in an atom returns from an excited state to a lower energy state.
Emission spectrum of a chemical element is the spectrum of frequencies emitted due to an atom making a transition from a high energy state to a lower energy state.
Emission spectrum has characteristic energy proportional to the frequency of the light.
Each element's emission spectrum is unique.