The Talmud relates that Rabbi Baroka was standing in the marketplace, and Elijah the prophet was standing next to him.
Rabbi Baroka asked Elijah: “Is there anyone here who is worthy of the world to come?”
Elijah answered, “No.”
As they spoke, two men entered the marketplace, and Elijah said that these two were worthy.
Rabbi Baroka ran after them and asked what their profession was.
They told him that they were comedians, whose job was to cheer the downhearted.
And this is what made them worthy of the world to come.
The Talmud relates that it was Rava’s custom to preface his discourse with a joke.
Then, after his students had laughed in merriment, he would wrap himself in his tallit (prayer shawl) and begin to teach them in a most solemn and awe-inspiring manner.
Precisely because he wanted them to receive the words of Torah with awe and reverence, he felt the need to first lighten the atmosphere and arouse their minds with a witticism.
–Rabbi Adin Steinsaltz