Photons and electronic transitions

Light comes as photons whose energy is Planck's constant times their frequency, and an atom or molecule absorbs or emits only photons whose energy equals the gap between two of its energy levels.

From AP Chemistry.