Is talking sarcastically with a friend as an innocent joke (not intending to offend him or bother him) a transgression of the ninth commandment, Don't lie (לא תענה)?
We actually find sarcasm used in the Talmud. One example that comes to mind is in Taanis 24b, where Rav Papa declared a fast day during a drought, but felt very weak. He ate a handful of cereal and went to Daven. The prayers for rain went unanswered. Rav Nachman b. Ushpezati told Rav Papa, 'If you'd eat another handful then you'd get rain'. Rav Papa was embarrassed and then it started raining -- in the merit of his pain.
It seems from the Mesilas Yesharim chapter 11 seen here that lying in a joking manner, which we can call sarcasm, is not exactly what is described as a real lie, but is nonetheless detestable to Hashem and at least included in the admonition in exodus 23:7 to distance oneself from falseness. Emphasis mine.
There are others whose sickness is milder than that of the first two types. The members of this third group are not confirmed in falsehood, but do not take heed to withdraw from it, and speak it when the opportunity presents itself, and very often by way of jest and the like, with no evil intent. The Sage, however, has made it known to us that all of this is contrary to the will of the Creator, blessed be He, and to the attribute of His saints (Proverbs 13:5): "The righteous hate a false thing." And it is in relation to this that we were warned (Exodus 23:7), "Withdraw from a false thing." Note that we do not have, "Guard yourself from falsehood," but "Withdraw from a false thing," this to awaken us to the greatness of the extent to which one must withdraw himself and flee from falsehood. As has been stated (Zechariah 3:13), "The remnant of Israel will not do wrong and will not speak falsehood; and a deceiving tongue will not be found in their mouths." Our Sages of blessed memory have said (Shabbath 55a ), "The seal of the Holy One Blessed be He is truth." Indeed if the truth is what the Holy One Blessed be He selected as His seal, how abominable must its opposite be to Him. The Holy One Blessed be He furnished us with a great exhortation concerning the necessity of abiding by the truth (Zechariah 8:16), "Let one man speak with another in truth; " and (Isaiah 16:5), "And a throne will be established in loving-kindness and He will sit upon it in Truth;" and (Ibid. 63:8), "And He said, `But they are my people, children who do not lie;' " (one is dependent upon the other) and (Zechariah 8:3), "And Jerusalem will be called "The City of Truth" (this to magnify its worth).
Sarcasm seems to be the translation of letzonus which is at least assur mi'divrei neviim.
At worst it seems to relate to the way the Nachash spoke to Chavah, 'D'you really think Hashem has your best interests in mind? Yeah.'
Sarcasm is often the beginning of a counter relationship with the thing, person or group you are being sarcastic about.
However kol letzonusa asira chutz me'letzonuso de'avidah zarah, so if you are bringing down a false deity or modern incarnation thereof that's fine.