Final answer:
Atoms emit and absorb light at specific wavelengths because their electrons exist in discrete energy levels. Transitions between these levels produce unique spectral lines for each element, which can be observed as emission or absorption spectra.
Step-by-step explanation:
Atoms emit light at only specific wavelengths because their electrons occupy discrete energy levels. When an atom's electron absorbs a photon with the exact energy required to transition to a higher energy level, it moves from a lower-energy orbit to a higher-energy orbit. The reverse process, in which an electron falls back to a lower energy level, results in the emission of light at a specific wavelength, producing emission spectra. Likewise, when atoms absorb photons of certain energies, they create absorption spectra with dark lines at the absorbed wavelengths. This phenomenon is due to the quantization of energy levels within the atom, as described by Niels Bohr's model for the hydrogen atom.
Spectral lines are observed due to transitions between these quantized energy levels, with each transition corresponding to a specific wavelength of light. This interaction between the atomic structure and light leads to each element having a unique spectral signature, which is used in spectroscopy to identify the composition of materials.