Because a ray of light when it passes from a rarer medium (say air) into a denser medium (say water) it bends towards the normal at the point of contact of the ray with the denser medium and when a ray of light travels from a denser to a rarer medium, the ray bends away from the normal at the point where the ray touches the lighter medium. That means the refracted ray depends on the refractive index of the medium.
If medium is dense the refracted ray will bend towards the normal, then Angle of incidence>Angle of refraction
If medium is rare the refracted ray will move away from the normal then Angle of incidence<Angle of refraction.