When light rays enter one medium from another, refraction takes place. Refraction refers to bending of light rays due to change in the speed of light rays as they move from one medium to another.
The refractive index of a medium is defined as:
n = c/v
where, n is the refractive index of a medium, c is the speed of light in vacuum and v is the velocity of light in that medium.
The refractive index of water is about 1.33, while that of glass is around 1.5 - 1.6 (depending on the type of glass). To have a higher refractive index, there are two possibilities:
a) higher value of c, which is not possible, as the speed of light in vacuum is a constant.
b) lower value of v, which is possible.
Thus, the speed of light rays decreases as they enter glass from water.
In general, when light enters a denser medium from a rarer medium, its speed decreases.
Hope this helps.