At atomic scales, matter "jumps" between precise energy levels. These energy levels are like rungs on a ladder. A particle is never between energy levels.
Electrons absorb and emit precise amounts of energy (light and heat) as they jump between energy levels. Just as electrons can't be between levels, they emit only precise frequencies of light corresponding to energy-level transitions.
Slightly different radiation wavelengths are emitted by each atom. This is due to nucleus charge and electron-number variations. This unique combination of emitted wavelengths works as a "fingerprint" for each element.
Larger energy-level jumps correspond to higher frequencies---violet and ultraviolet radiation. Smaller changes in electron energy correspond to red and infrared light.
A previously unknown atomic spectrum was detected in the sun more than 100 years ago. Helium was observed by its atomic spectrum in the sun before being found on Earth.