First, I'm not sure if photons have to "get up to" the speed of light, or if they are thrown into existence at that speed. I know that they should just be generated moving at their speed, and I know that they have zero mass so asking about acceleration is a little strange, but what about when light hits an interface? Does it need to "slow down" to the new speed of light? Or does a new photon get generated?
One has to keep clear in this case the difference between a photon and an electromagnetic wave.
An individual photon is an elementary particle, its wavefunction is given by the quantum mechanical form of Maxwell's equations and the square of this wave function is a probability distribution for its position in space time, not a wave in space.
The electromagnetic wave, is a solution of the classical Maxwell equations and is the one that defines the different indices of refraction going through media and the different velocity c' observed while going through a medium.
The electromagnetic wave is built up by a great ensemble of photons where the frequency of the classical wave is the same as the frequency of the probability wave, the one that describes the energy of the photon, E=h*nu.
What the individual photons do when in ensemble is that they join up so that the phases match up and one observes the classical wave. Crossing a medium individual photons may,for example, scatter elastically from the field of the crystal and change the phase relations in the ensemble, building up the refracted wave.
If one were able to tag an individual photon one would find its velocity c, but the group and phase velocities building up the classical wave differ before and after crossing the surface of the medium. Each individual photon changes phase in the (transparent) new medium. The changes are such that the ensemble of photons builds up the classical wave which fulfills the refraction index behavior.
Light in a vacuum (and according to special relativity and electromagnetism) does not accelerate, once it is generated it already has a speed of $c$ (constant speed of light).
Whether this is an acceleration (eg as in mechanics) see this answer, however this can be an open question in such cases (as general relativity itself can be an open question)