Sally Davies looks to the past:
The Roman orators Cicero and Quintilian believed that “paronomasia”, the Greek term for punning, was a sign of intellectual suppleness and rhetorical skill. Jesus himself was a prodigious punster. His declaration that “upon this rock I will build my church” famously played on the way Peter’s name echoed the Ancient Greek word for rock, “petra”. Jesus may have also salted his speech with puns on Aramaic words, the language of everyday communication. When he condemns the Pharisees for letting punctilious piety blind them to mercy, Jesus calls them “blind guides, which strain at a gnat [galma], and swallow a camel [gamla]”.
And, of course, there’s Shakespeare:
The characters in his plays that begin the bawdy jests and elaborate badinage are almost always pages and buffoons, commoners at the mercy of their aristocratic overlords. Puns give them a cloak of deniability – the joke permits ordinary folk to make light of their social betters without violating the norms of respect. Sex and death were these characters’ favoured subjects – Shakespeare seemed to intuit what Freud would argue some 300 years later, that humour helps us cope with the terrifying and taboo.