A pun is a play on words, usually for humorous effect. Shakespeare liked to use puns, often with sexual meaning. However, puns can be based on just about anything.
Although puns are often made for humor’s sake, the person making them is not always laughing. For example, Romeo makes a pun on the idea of being “in love.”
Out of her favour, where I am in love. (Act 1, Scene 1)
In this case, the pun is a play on the concept of being “in love” and Romeo is not really in a laughing mood. It’s not really an incredibly sad scene though, because Shakespeare is still using the pun to inject some silliness.
Sometimes one character makes a pun off of the other. Consider this exchange.
That dreamers often lie.
In bed asleep, while they do dream things true.
The double meaning of “lie” is a pun, as in the fictional nature of dreams and being flat in bed. In this case Mercutio begins the pun, and Romeo completes it.
The character of Mercutio uses puns a lot, often of a sexual nature. However, his most famous pun is with his dying words. Mercutio is such a punster that even with his last breath, he has to use a pun!
Ask for me to-morrow,
and you shall find me a grave man. (Act 3, Scene 1)
He will be a grave man, meaning serious, because he will be in his grave, because he will be dead!
Romeo and Juliet is one of the bawdiest plays the bard wrote, and one of the funniest. This comes in large part from the puns. The puns, largely coming from Mercuito and Nurse, were designed to entertain the cheaper seats in the theater, but would have brought a chuckle from even the nobility. Even today, modern audiences can’t help but smile even in the most tragic scene when poor Mercutio is killed by Tybalt in a brawl and dies with a pun.