This is not always a correct statement - witness absorption and emission spectra, especially for the hydrogen atom, explanations of the line spectra for which led to the postulation of energy quantization.
Also, remember there are electronic, vibrational, and rotational degrees of freedom...