A pun is a play on words. There are puns throughout the play, and in the dramatic Act 5 they serve as comic relief.
Romeo’s man Balthasar greets him with a pun at the beginning of Act 5. Romeo asks him if Juliet is well, because “nothing can be ill if she be well.” He is basically saying that as long as Juliet is all right, everything is all right. Unfortunately, Balthasar tells him that Juliet is dead. He does so as a pun, however, which seems particularly insensitive even if it is kind of funy.
Then she is well, and nothing can be ill.
Her body sleeps in Capels’ monument,
And her immortal part with angels lives. (Act 5, Scene 1, p. 102)
The fact that she is well is incorrect, of course. It is a joke. She is not really well, she’s dead! Why Balthasar decides to make a joke at a time like this is questionable, but it certainly provides some comic relief for the audience when things are about to get very, very sad. Part of the reason for the humor is a jolt to the audience, because Romeo is in his poetic lovesick state, and he is about to be pulled out.
Puns allow for jokes to be scattered in even the most serious scenes, as this one demonstrates. Even though Romeo and Juliet is a tragic play, most of it is uproariously funny, and it is because of puns like this one.