This is a gross oversimplification, but – black eyesare black because the rat has lots of melanin (black pigment) in theeyes. If you reduce this black pigment, the eyes become ruby, then red, then dark pink, then finally light pink if there’s no melanin at all.
Markings (white bits) on rats are where there’s no melanin too – there’s no melanin, so there’s no colour, so the fur becomes white. When a white patch is near the eye, there is a chance that the eye will be involved in this and lose some or all of the melanin, and so become paler coloured – and if this only happens on one eye, it will be odd eyed.
Certain genes makes odd eye more likely to happen. The colour gene red eye dilute (that gives buff/topaz) makes it more likely for odd eye to express. The Essex gene – especially when combined with RED – often gives odd eyes. The white spotting gene that gives chinchilla type rats is more likely to produce odd eyes. You can select towards the likelyhood of it happening but as there’s not a single gene that creates it, you can’t make any guarantees as to it happening.