Leading on from this question - are there any examples of the Buddha showing a sense of humour or a certain lightness in his teachings within the Pali Canon? I was once told that it is possible to find examples where he perhaps approaches teaching with a gentler approach depending on his audience. Certainly the Buddha gives the lions roar but does he sometimes give the cheeky wink too?
You could say the Buddha and arahants had a peculiar form of humour, as Konrad suggested in his comment above. The hasituppādacitta (smiling-producing mind) is a citta unique to enlightened beings. While they can also smile due to beautiful-functional cittas, the hasituppādacitta is rootless, containing none of the wholesome or unwholesome roots.
This means they would smile at things ordinary folk wouldn't, like brahmas being born as pigs (Dhp-A 338), or ghosts being tortured for past misdeeds (Dhp-A 71).
The formulaic way the suttas are recited make it difficult to see much humour. But there is a really interesting series of talks by the scholar John Peacock, "Buddhism before the Theravada", where he talks about the way many of the Buddha's concepts, even some of the most basic and familiar ones, could have been seen as provocative and satirical at the time he spoke them- particularly, satirizing or punning on brahmanical rituals (http://www.audiodharma.org/series/207/talk/2602/).
There was some short sutta I saw, I think in the Anguttara Nikaya, where the Buddha said something like "This is so important, I can't even think of a simile for it". Considering how free the Buddha was with similes, I think his listeners would have taken this as a bit of a joke :)
There are examples of satires by the Buddha in the Pali canon. Presently I can remember two instances:
(1) In Tevijja Sutta (DN13), the Buddha compares the brahmans claiming to show the way to meet the Brahma without ever seeing him to a young man searching for the perfect girl, without seeing her or knowing her name and whereabouts.
(2) In Assalayana Sutta (MN93), the Buddha ridicules the claimed superiority of the brahmans by birth by saying that the "brahman-women are plainly seen having their periods, becoming pregnant, giving birth, and nursing [their children]. And yet the brahmans, being born through the birth canal, say, 'Brahmans are the superior caste; any other caste is inferior."
You can have a look on "What the Buddha Thought" by Richard Gombrich where there is a chapter on Buddha's satire.
There is humour in the suttas, but inevitably it is used as a lead up to a more serious discussion of dhamma.
The frame story of this sutta presents a gentle satire of royal life. Despite his position, King Pasenadi Kosala must still act the role of messenger for his wives. Because of his position, he finds himself surrounded by people he cannot trust — he never gets to the bottom of the question of who brought misinformation into the palace — and whose minds fasten on issues of overthrowing and banishing, possibly him. He is so preoccupied with his responsibilities that he doesn't pick up on the Buddha's gentle joke about his servitude to the sisters Soma and Sakula, can't stick with an issue for any length of time, sometimes can't even phrase his questions properly, and can arrive at no greater certainty about the Buddha's teachings than that they seem reasonable. At the end of the sutta he has to leave, not because he has exhausted the issues he would like to discuss, but because one of his courtiers tells him it is time to go. All in all, not an enviable position.
I'd also recommend Ajahn Sujato's blog post for more examples: https://sujato.wordpress.com/2011/11/29/the-ten-funniest-scenes-from-the-pali-canon/
There's a page on Ven. Sujato's blog, The Ten Funniest Scenes from the Pali Canon.
The Buddhism.SE site guideline say I ought to quote from the reference; so here is the first, of ten:
10. Saccaka gets his comeuppance
Majjhima Nikaya 35, Culasaccaka Sutta
Saccaka the wanderer features in a few Suttas. Here he threatens to take on the Buddha in debate on the five aggregates and not-self, giving an elaborate series of similes on how he will drag the Buddha about ‘like a huge elephant would enjoy a game of washing hemp’.
Where’s the funny?
While Saccaka is boasting, there’s no doubting his pride is due for a painful fall, and the Sutta doesn’t disappoint. He ends up thoroughly humiliated, seating and depressed. But like all good thrashings in debate, it turns out to be a necessary antidote for his pride. He ends up becoming an arahant.
Readers mention others in the comments at the end of that post.
There is one passage in the Vinaya (rules of conduct for monks and nuns) which struck me as showing a sense of humor from the Buddha. He saw in the distance a hut made from sun-baked mud that a monk who was a potter in his life as a householder before he went forth. The Buddha asked the Ven. Ananda something like, "Ananda, what is that thing in the distance that looks like a beautiful ladybird?" If you are familiar with how the Buddha wanted his monks to live, abandoning luxuries and things of beauty, then you might appreciate the subtle humor of this. Ananda replied that it was the hut that a particular monk had made, though I suspect that the Buddha already knew that. The Buddha then made a rule that a monk could not make a sun-baked hut.