Rats are rather short-sighted, though if you stand close (within about 2ft) an affectionate rat will often focus on your face and make eye-contact.
Note that rats with "pink" (i.e. pale, translucent red) eyes, such as albinos, silver fawns and champagnes, and even some ruby-eyed rats, have blurred sight and will often weave their heads from side to side in order to focus on things. This looks peculiar and would be a handicap in the wild, but is entirely harmless in a domestic situation.
Some rats, especially very old rats, develop cataracts - a progressive white clouding of the lens of the eye, visible as a pearly disc covering the pupil. Some become completely blind, but it doesn't bother them much, as sight is a secondary sense to a rat: it's rather like a human losing their sense of smell. If you have a blind rat, don't change the layout of their cage around more than you can help, or they may become confused.
The red discharge sometimes seen around a rat's eyes is not blood but the same sort of tear-and-mucus fluid you would see in a cat or human with runny eyes, except that it contains red chemicals called porphyrins. But it does indicate a problem. Sometimes it accompanies snuffles or wheeziness and is secondary to a respiratory infection; at others it may indicate that the eyes are sore or infected on their own account.
If the problem is an eye infection - conjunctivitis or similar - you may be able to clear it up with non-prescription eye-drops from a chemist or pet shop; or for more severe cases your vet will prescribe something suitable. But also check that the animal's eyes are not being irritated by something in its environment. Never ever use sawdust as a litter, as this irritates both eyes and nose: use a good-quality wood shaving, preferably spruce (the least resinous wood which is commonly available), which has had all or nearly all of the dust extracted; or use a paper-based litter or soft cat-litter. If you give your rats hay to nest in, again make sure it is of good quality, as dust-free as possible. If you smoke, don't do it in the same room as your rats. And make sure the rat isn't being exposed to a build-up of ammonia from its own urine: even if the rest of the cage appears clean the bedding in the nest may be wet and need changing, and also the cage should be well-ventilated, i.e. wire-sided rather than a tank.