its because the raindrops are spherical
the optical phenomenon that take place ( it requires ray diagram to explain ) after the ray enters the drop is total internal reflection and then the ray comes out
also it has got something to do with the angle between the sun and the rain drop which we will study during engineering
also, obviously the sun has to be behind the observer's eye so that the eye is between the sun and the drop