Aha! "
We can calculate this probability using perturbation theory, and the equation is called Fermi's golden rule. Doing this calculation tells us how likely the photon is to promote the atom to the excited state, and we'll find that this depends on the photon energy and the probability is high only when the photon energy matches the energy difference between the states."