When light waves pass from air into a transparent material such as glass or diamond they slow down. The size of this change of
speed depends on the refractive index of the material.The larger the refractive index the bigger the change of speed.
Diamond has a higher refractive index (2.42) than glass (1.5) and so the waves slow down more in diamond than they do in glass.
When the waves come out into air they speed up again.