There is an excellent book by Yehuda Radday and Athalya Brenner, entitled *On Humor and the Comic in the Hebrew Bible* (JSOTS Series; Continuum International Publishing Group, 1990). I don't have a copy on hand, so I cannot provide you with the relevant page numbers, but the sorts of issues that they explore are whether or not, and to what extent, Jonah is a parody and Esther is a parody, whether or not there is scatological humour in such passages as Ehud's assassination of the fat Moabite king, and so on. For passages within the Torah in particular, I seem to remember them mentioning situational humour (such as when Pharaoh's magicians demonstrate their prowess by making the plagues worse), and puns. That last one is important, since it underscores the fact that humour isn't necessarily that which makes you laugh.

To my mind, the most beautiful example is one found outside of the Torah, in the book of Samuel. When we meet Saul, we are told that he is exceptionally handsome and very tall. On his way to find the seer, Samuel, he encounters a group of young girls drawing water from a well. (Almost every book I've ever seen on the Hebrew Bible as literature mentions the trope of 'boy meets girl at well'). When Saul asks them about the location of the seer, they respond with the most syntactically awkward conglomeration of phrases, anticipating and repeating one another in confusion. Rather than suppose that we are looking at a corrupted text (as some have, historically, supposed), it makes greater sense to suggest that the author is representing the sound of a group of young girls speaking over one another in order to answer the handsome stranger.

For the Torah in particular, one of my favourite examples (and one not mentioned in Radday and Brenner's book) is the response of Cain to his punishment. He is already singled out as being arrogant (his statement in 4:13 can be read as both an expression of anguish and a rhetorical question: "Is my crime too great to be forgiven!?"), so it is unsurprising that after being condemned to a life of vagrancy he goes and settles himself elsewhere and founds a city.

The specific punishment that God gave him was that he be "נע ונד" (a wanderer and a vagabond) upon the earth - 4:12. Both of those words are participles, which means that they can be read as verbs (wander, move back and forth) or as nouns (one who wanders, etc). The land in which Cain settles himself after receiving this punishment is Nod - formed off the participle of נד! In other words, it would be like somebody being told they must be "a wanderer", so settling in a land called "Wander".

As to whether or not these are viable examples, and as to whether or not they reside in the minds of interpreters, you should look at Radday and Brenner's book. There is good evidence either way, and anybody who wishes to treat the Bible as literature needs to consider the sorts of difficulties inherent in ascertaining genre and intent, given the length of time between its composition and today, the foreignness of the culture that produced it, and the fact that it is written in a language that is no longer spoken.

**Postscript**

> I was going to add a second answer, now that people are actually
> providing more in the way of specific examples, but I figured I'd add it to
> this one instead. This is an example of humour in Tanakh that I didn't
> mention - one that I personally find very funny, and which I think is
> *continually* mistranslated. It can be found in 1 Samuel 15:32-33, and constitutes the (rather grisly) execution of Agag, king of Amalek.
> 
> When Agag is brought before Samuel, his "famous last words" are to
> declare that, אכן סר מר המות. This is translated by JPS as "Ah, bitter
> death is at hand!" - although they note that the Hebrew is apparently
> uncertain. Artscroll, similarly, translates it as "Alas, the
> bitterness of death approaches", the NRSV has "Surely this is the
> bitterness of death", and so too several other translations.
> 
> Myself, I would read סר as a masc. sg. participle of סור ("turn
> aside"), its referent being מר המות. My translation, therefore, would
> render this as the hapless and ironic observation that "At least the
> bitterness of death has passed!" Agag, you couldn't be more wrong.