When you go through quantum field theory, photons are defined in terms of freely propagating particles, not interacting with other fields. When the disturbance in the EM field propagates into, e.g. a dielectric material, and strongly couples to various nuclear and electronic excitations, it is better described in terms of a massive quasiparticle, the polariton, which is a hybrid of the photon, phonon and electron fields and, being massive, propagates at less than c. You can, of course, describe it in terms of perturbations to the free photon corresponding to various types of virtual absorption and re-emission, but it's a bit misleading to think of it being physically absorbed and re-emitted with little stopovers. If anything, the classical model of a continuously interacting medium interacting with the EM wave creating a coherent response wave which interferes with and appears to slow down the EM wave is more instructive.
(It may help to observe that an object with nonzero mass moving at the speed of light would have infinite momentum, and then it maybe makes sense that "zero times infinity" becomes a finite number)
When you shine light through glass the maximum propagation speed, the speed at which you start getting photons out the other side, is about 2/3 the speed of light. This implies that the overwhelming majority of photons are adsorbed and re-emitted. So this explanation cannot be correct, as I can look through a pane of glass, but you're saying any photon adsorbed is re-emitted in any direction, and the overwhelming majority of photons must be adsorbed and re-emitted.
In my comment, I talked about actual absorption, which means that there is a finite time interval when the photon does not exist and the atom/molecule who absorbed it can be observed in a different state than usual (electron in a higher orbital for an atom, different vibrational modes for a molecule). Later, the atom/molecule will go back to its normal state emitting a photon with the same energy as the first one, or several lower energy photons. This actual re-emission will not have a favourite direction. Depending on the typical time scale of the re-emission, you may call this process fluorescence or phosphorescence (http://en.wikipedia.org/wiki/Phosphorescence).
But then why is the speed of light in glass smaller than in vacuum?
A time varying electromagnetic field is produced by moving charges (except for a minor distinction about steady currents). The direction of motion of the charges determines the polarization of the emitted field. Later on, when the field encounters matter it produces an identical motion of charges i.e; if originally an East-West charge motion produced a North-South field then a N-S field will induce an E-W motion among new charges which in turn re-emit N-S light. The original light and the re-emitted light interfere, the delay is what slows the light down, as noted by others. But you can see why the direction is the same.
Note: I suppose this picture is somehow tied to reciprocity of the Maxwell equations between sources and fields, I need to go look it up again.
The short answer is, they don't. They emit the photon in a random direction.
Fine, you say, but what about refraction and reflection, there the photons are emitted in another direction. What makes the atom "decide" what direction to emit a photon after it's absorbed?
They don't decide anything, they still just emit in a random direction. The mind fuck is that on the whole, statistically, almost all photons except for those travelling in the direction of refraction/reflection destructively interfere!
[1] http://vega.org.uk/video/subseries/8 [2] http://www.amazon.com/QED-Strange-Theory-Light-Matter/dp/069...
http://en.wikipedia.org/wiki/Path_integral_formulation
So the reason you have a coherent wavefront moving through a lens, as one example, is not because the photons are emitted in a particular direction, but at a particular time.