What happens when a molecule absorbs a photon?