Mechanisms of refraction and transmission of light can be explained using the boundary condition of Maxwell equations.Across material interface, tangential components of electrical and magnetic field are continuous,by solving M's equations using proper boundary conditions, the law of reflection and refraction can be obtained.
Similarly, in the view of photon, Principle of Fermat ( also called shortest optical path principle)best explained the way of light propagation.