The noun rain comes from the Old English regn, which itself comes from the proto Germanic regna. That g probably did used to be pronounced—if you don’t remember my post on silent letters, words with gn used to pronounce the g too, and in fact it’s still pronounced in other Germanic languages, like Dutch and Swedish. However, in English it was dropped just as it was with the word gnaw. It’s also worth noting that rain the verb comes from the Old English regnian, which was often shortened to just rinan, so it’s possible that spelling was simply preferred.
Reign first showed up in the early thirteenth century, first as a noun and then as a verb at the end of the century. The noun comes from the Old French reigne while the verb form is regner. Both words can be traced to the classical Latin regnum, which means rule or realm. The g actually makes sense in Latin, where it was vocalized, but like many gn words, it was just a graphical remnant of an old pronunciation.
Finally, there’s rein, as in a bridle lead. It first showed up in the early fourteenth century from the Old French rene and (most likely) the Vulgar Latin retina, a bond or check. As far as I can tell, no, it’s not related to the word for eye. That word is actually from, get this, the Greek word for tunic and totally beside the point. Retina—the Latin retina—comes from retinere, hold back, the origin word for retain, itself a mix of the prefix re-, back, and the Latin tenere, to hold. So basically, rein is retain without the two middle letters.
Tony Jebson’s page on the Origins of Old English