When an electron in a hydrogen atom is somehow excited to a higher level, say n = 1 to n = 2, it wants to return to its level of origin, in this case, the ground state. Such an electron will emit photons of certain wavelength as they return to their level of origin. Hence, there should only be certain wavelengths of light emitted, since the change in energy from different energy levels is constant (nearly) in such a hydrogen atom. The electrons emit photons of only certain wavelengths.