In Oedipus Rex, there are different kinds of sight and blindness present throughout the cast.
Tiresias is literally blind, yet he is the only character who "sees" the truth. He knows who Oedipus is and chides him for his arrogance when the king gets angry about being told the truth.
Jocasta is willfully blind. She begins to suspect the truth of Oedipus's identity the more he pries into the past, but she still tries to live in blissful ignorance. She begs Oedipus not to go further with his investigation, but he declines. Once she can no longer avoid the truth, she commits suicide rather than deal with it.
Oedipus experiences two kinds of metaphorical blindness before becoming literally blind at the end of the play. First, his blindness takes the form of mere ignorance, with Oedipus not knowing the truth of his parentage or his marriage, but he pursues truth over the course of the play.
He does not believe Tiresias when he is told he is the cause of the plague and even gets angry at him for telling the truth, which makes him willfully blind, much like Jocasta is. However, the truth eventually cannot be denied. Like Jocasta, he harms himself from the horror, but he does not kill himself—he only gouges out his eyes, trading spiritual blindness for physical blindness. He does not want to see the suffering he has caused or the face of the woman who is both his lover and his mother or the children who are both offspring and siblings.
Blindness is an important motif throughout Oedipus Rex. There are numerous related references to vision, insight, light, and dark. Blindness is used both literally and metaphorically in the play. Oedipus, King of Thebes, has physical sight but is blind to his background: he is the murderer of Laius, he has married his mother, and he has unwittingly fulfilled Apollo's prophecy.
The theme of blindness comes to the forefront in the play when Oedipus calls upon the blind prophet Teiresias to help elucidate some information from Apollo's oracle. Thebes has been suffering a plague, and Creon has found from the oracle that the long-unsolved murder of former king Laius has to be solved because the killer must be ousted from Thebes in order to eliminate "the land's pollution." In the hopes that he can provide even more direction, Oedipus asks the renowned Teiresias to consult with him about the oracle. Teiresias, again, is physically blind and needs a young boy to lead him to Oedipus. Teiresias is hesitant to reveal what he knows, but Oedipus presses him. Eventually, Teiresias accuses Oedipus of being the murderer he seeks. Oedipus quickly becomes angry and pokes fun at the prophet and his blindness. Teiresias tells him, though,
You have your eyes but see not where you are
in sin, nor where you live, nor whom you live with.
Do you know who your parents are? Unknowing
you are an enemy to kith and kin . . .
A deadly footed, double striking curse,
from father and mother both, shall drive you forth
out of this land, with darkness in your eyes,
that now have such straight vision . . . (I. 467-470, 472-475)
Teiresias brings up a central conflict—Oedipus's lack of self-knowledge—and describes it in terms of physical and metaphorical blindness. Oedipus's lack of insight, his ignorance to the deeds he has committed and to the truth of his birth, is ironic given that Oedipus is capable of physical sight. Teiresias, on the other hand, is literally blind but sees more about Oedipus than Oedipus can see in himself. Teiresias also makes a key prediction here: he thinks that Oedipus will be banished from Thebes "with darkness in [his] eyes." This does, indeed, happen at the end of the play.
Once Oedipus learns the truth of his parentage and that he is the killer of Laius, his father, he blinds himself by gouging his eyes out. He does not want to literally see his parents in the underworld or the city that he has wronged. Now that Oedipus has insight, or metaphorical vision, he no longer wants physical or literal sight. Oedipus's position has been reversed by the end of the play.
One way to approach answering this question is to look at Oedipus and Tiresias, the blind prophet. Although Oedipus, who has the physical ability to see, believes that he can discover the truth about the identity of King Laios' murderer, he is blind to the fact that he himself is guilty. He is also unaware that he has indeed fulfilled another part of the prophecy he tried to escape: married his mother.
Tiresias, on the other hand, is physically blind, but he has the ability to "see" metaphorically; he can make predictions. He also knows the truth about Oedipus' identity, but the old seer doesn't want to reveal this painful reality.
When Oedipus discovers the awful truths, he gouges out his eyes, thus physically blinding himself to the reality around him; he cannot bear to look at the children he has sired, knowing they are his half-siblings.
The play is full of references to sight and blindness, to light and dark imagery. All of these reinforce Sophocles' ideas about truth being a matter of perception.