There is a good deal in the play about seeing and blindness. What purpose does this serve?
This is a great question. The theme of seeing and blindness is all over the tragedy. Let me sketch this theme a bit.
In the beginning of the tragedy, we can say that Oedipus is pretty sure of himself. For example, he solved the riddle of the Sphinx and he is now convinced that he could fix the problem of the plague of Thebes. From this point of view, we can say that Oedipus is filled with pride or hubris. This, in turn, blinds him.
As the story progresses, it is becoming increasingly clear to all that the curse of the land is due to Oedipus. He is the one who killed his father and married his mother. Jocasta, is wife/mother sees this all to clearly and so she takes her life. the chorus sees this. The blind Tiresias see this as well. The only one that does not see this is Oedipus. We can say that he is blind.
What make this blindness even more pointed is that there is a juxtaposition with a blind seer, Tiresias. Through this, Sophocles is able to show the blindness of Oedipus by contrasting him to the insight of the blind seer.
At the end of the tragedy, Oedipus finally sees, but the irony is that he is now physically blind.
A central theme of Oedipus Rex is the way hubris, or pride, can blind us to our own flaws and weaknesses. As the play opens, Oedipus cannot conceive that he is the cause of the plague in Thebes, which Creon attributes to the person who murdered Laius having escaped justice.
Oedipus himself murdered Laius, out of pride, having been offended by him without knowing who he was, and yet ironically, his pride blinds him to any idea he could be responsible, even when he is warned he should not look too deeply into the events leading up to the plague.
When Oedipus realizes he is the murderer and that Laius and Jocasta were his parents, this perception overwhelms him. If pride had blinded him, he now sees too much, realizing he has committed parricide and incest. He blinds himself as a symbol of how blind he has been--ironically, he "sees" or perceives more when he is physically sightless but humbled.
Seeing and blindness serve the purpose of reinforcing the idea that we should not be so proud that we are incapable of perceiving our own flaws.