Take a story's temperature by studying its tone. Is it hopeful? Cynical? Snarky? Playful?
Ironic, Humorous, Sarcastic
Kids in Mark Twain's day must have been really smart. Of course, we could be wrong, but we don't remember finding 16th-century English very entertaining when we were kids, and we're not sure if we would have understood the ironic and sarcastic humor that makes this novel so funny for us now.
But yeah, now that we are older, we totally think Mark Twain's sense of humor is the bee's knees. If it weren't for this humor, The Prince and the Pauper would be a pretty depressing novel. Instead, Twain manages to make even the saddest things funny. For example, the narrator says: "One summer's day he saw poor Anne Askew and three men burned at the stake in Smithfield, and heard an ex-bishop preach a sermon to them which did not interest him. Yes, Tom's life was varied and pleasant enough, on the whole" (2.7).
In case you missed it: yes, that is a joke about a kid whose only entertainment is watching people burn at the stake.
The only reason this humor comes off as funny instead of insensitive is that it's ironic and sarcastic. We know, for example, that when the narrator says, "Yes, Tom's life was varied and pleasant enough, on the whole," he actually means that it was boring and terrible life. It's the disconnect between what the narrator says and the reality of the situation that makes the statement funny—and it draws our attention to the unfairness of the poor people's situation.