A closer look at Excitation energy
An atom needs a definite energy input to move from one bound level to a higher one.
Photons or collisions can provide this excitation energy. Excitation leaves an electron bound, while sufficient extra energy can remove it entirely. The ground state is the lowest-energy state available to a system.
A photon with the wrong energy cannot drive a particular sharp bound-to-bound transition in an isolated atom. A spectrum therefore carries discrete features.
Want to learn more about Excitation energy? Excited state on Wikipedia.

