Electrons have only certain allowed orbits around their nuclei. The allowed orbits, which are associated with unique energy levels, are different in all different types of atoms. The wavelengths of any atom's spectral lines are determined by the differences in the energies of the orbits between which its electrons transfer. The higher the energy difference, the shorter the wavelength of the photon that is emitted or absorbed. When electrons descend in orbit, they emit photons, creating emission spectra. When they go to higher orbits they absorb photons, creating absorption spectra. Since all elements have allowed orbits with different energy levels, the emission and absorption spectra of each element, such as hydrogen, has a unique set of wavelengths.