Because it can't. Every once in while an electron will jump to a higher energy state than its ground state, probably due to absorption of a photo or collision with a nearby particle thus gaining energy. read more
X-rays are emitted by the heavy elements when an excited electron in a high energy level falls to a lower energy level. The lowest energy level in hydrogen is at -13.6 eV. An electron falling from a higher level can give off at most 13.6 eV, which is the energy of a photon with a 94 nm wavelength. read more
The more protons an element has, more energetic its lines can be. read more