We're used to kids being sassy, but not toddlers. At what age does sarcasm become understandable to a developing brain? The answer depends on the way that that sarcasm is delivered.
In my elementary school classes, the teachers had a habit of making students read sections of the books that we were assigned for English out loud to the class. The reason they gave for this was that the reading helped them determine whether we were reading and understanding, but I personally think that they believed that no child is ever self-conscious enough. (In high school, they move on to making you compose and read out your own poetry.) At one point, I came across a sentence that I knew was wrong. The meaning was wrong for the situation, and though I had heard people using the wrong tone, generally in a mean way, I couldn't make it fit in my mind. The teacher had to correct my reading.
It turns out that the teacher was just not up to snuff when it came to understanding child development. It appears that when kids at around the age of eight or nine encounter sarcasm, they know it's sarcasm only by tone. They take the cue that something's amiss from the way the speaker sounds, just as younger children might not know words, but know the sound a voice makes when it's happy, calm, angry, or afraid. When children are exposed to sarcastic comments in a neutral tone of voice - or through some other medium that doesn't convey tone - they don't pick up on sarcasm even when it's obvious. (For example, when a person is in the middle of an obviously bad situation and sarcastically says, "This is great.") It takes until about middle school, age eleven or twelve, for kids to begin to understand sarcasm without audio cues.
Why is this? It's been shown that people with specific head injuries can't understand sarcasm either - so the ability to understand sarcasm depends on the function of the brain. It could also be the need to develop empathy. The ability to understand sarcasm requires the ability to understand another person's mindset, even when their words don't match their actions. People who have difficulty empathizing, due to brain lesions, also have difficulty "getting" sarcasm. Or it could just be that people need to practice working with a new concept before they master it. If that's the case, it's no surprise that they master it by middle school.
Image: Nicholas Renaud
Via Child Development, Brain and Language, Brain and Cognition.