In Act III Scene ii of Romeo and Juliet, Juliet's speech contains a triple pun on the sound that can be variously understood as "eye," "I," and "ay":
Hath Romeo slain himself? Say thou but ‘I,’
And that bare vowel ‘I’ shall poison more
Than the death-darting eye of cocatrice
I am not I, if there be such an ‘I’;
Or those eyes shut that make thee answer ‘I.’
If he be slain, say ‘I’; or if not, ‘no.’
Brief sounds determine of my weal or woe.
In other words, if the Nurse says "ay" (yes) to confirm Romeo has committed suicide, it will kill Juliet as surely as would the deadly eye of the legendary cocatrice. It will remove the reason for her existence ("I am not I") if this proposition is to be answered with an "ay" and Romeo's "eyes" are shut forever. Folding together the three meanings into one sound underlines how critical this fatal answer would be to Juliet's selfhood.
This wordplay serves a triple purpose: it is humorous in itself, it is a display of linguistic prowess that gives a good actor an opportunity to stand out, and it foregrounds Juliet's dilemma in this scene: her new husband has just killed one of her closest relatives (Tybalt) and has been banished for it, although at the point she delivers this speech, Juliet is still under the mistaken impression that the Nurse is referring to the death of Romeo himself.
In studying Shakespeare's puns and his frequent use of other "low" techniques, such as obscene jokes and allusions, we need to remember the nature of his audience. Many if not most of Shakespeare's plays were written for the public of his time and could be viewed at a cost the ordinary man could afford. As a prudent businessman, Shakespeare thus had to introduce elements that would appeal to viewers with the common man's sense of humor. The enormous range that this demand drew forth from him -- the fact that his writing has a wider appeal than merely to the classically educated gentlemen of his time -- is one reason why Shakespeare has been so consistently popular and has worn so well over the centuries.