Theory of the dynamical Stark effect