Sarcasm is ever present in literature, particularly in English literature. Sarcasm is a literary bed-fellow of satire and irony and is used almost exclusively as a humorous device. Sarcasm is used for many different reasons, often to simply subvert the original meaning of what is being said as a satire or sending up of the subject.
The Bible has a number of different forms of sarcasm and is quite a good source for quoting examples. However, and this is purely personal, I find the interpretation of many biblical scholars on this point to be rather dubious. It seems to me that in many of the examples of biblical satire and sarcasm, it is often the wrong or evil-doers that are most often displaying these sarcastic characteristics.
In Exodus 14:11, asked of Moses who was leading the Israelites from Egypt:
"Was there a lack of graves in Egypt, that you took us away to die in the wilderness?"
Within William Shakespeare's work, sarcasm is definitely more ever present and is used with a more cutting edge, most often by the main protagonist. For me the most sarcastic character in Shakespear has to be Hamlet. Clearly the man's a bit, well, mentally ill - but also a very clever man. Whilst it is said by modernists that sarcasm is the lowest form of wit, listening to Hamlet could certainly change anyone's mind. Hamlet uses sarcasm as a relatively threatening and aggressive thing - he's not being that way for "laughs", there is usually only an audience which would not recognise the sarcasm.
Hamlet: Act 1, Scene 2, in which Hamlet decries the situation whereby Hamlet's mother marries his uncle far too soon (in his opinion) after his father has died:
"Thrift, thrift, Horatio! The funeral bak'd meats did coldly furnish forth the marriage tables."