When an electron absorbs a photon with exactly the energy needed to jump from a lower to a higher orbital. No more, no less. Fingerprinting Matter Other atoms have more electrons, and hence more complex electron orbital structures. Results in more complex line spectra. There is a unique spectrum for each element, reflecting its unique electron orbital structure.
Isotopes show the same lines, but slightly shifted in wavelength.
Every element has its own, distinctive spectral signature. Compounds of two or more atoms, often of different elements. Share some electrons in common orbitals. Bands often span large wavelength regions. Often get strong lines at infrared, microwave, and radio wavelengths.