English sarcasm is primarily conveyed through tone
A great deal of vocal communication is done through tone and body language, rather than the words themselves. These features are generally lost in writing.
"Bob, I thought I heard some crying in the well."
Now, when Bob said "Right", did he mean "I don't believe you", "correct", or "thank you for reminding me?" I could communicate any and all of those sentiments with the word "right", using different intonations. But when I just write the word "right", all of that is lost.
Tone is used as a strong indicator of sarcasm. Without our ability to rely on it as an indicator, our ability to differentiate sarcasm is greatly diminished.
That said, there are ways to communicate tone in writing. Punctuation marks are primative tonal indicators, and adjectives and adverbs (such as drawled, or even "said sarcastically") can help pinpoint a speaker's tone. Descriptions of body language can also be used to get across what a character means.
In casual interpersonal communications, where adjectives and descriptions of body language are out of place, emojis have largely filled the gap and provide emotional context to otherwise indecipherable statements.
I have heard (although I cannot confirm), that native speakers of tonal languages (which use tone to distinguish different words and therefore cannot use it for sarcasm without changing the words themselves) are much better at recognizing written sarcasm than English speakers. The flip side is that they themselves are less likely to intone their sarcasm even when speaking English, and they are more likely to get their sarcasm misinterpreted by their English audiences than other speakers would.