I enjoy the way author Harper Lee injects a bit of humor to contrast the potentially deadly situation that unfolds at the jail. One of the funniest moments of the novel comes when Scout attempts to protect Jem, this time using her foot instead of her fists.
"Don't you touch him!" I kicked the man swiftly. Barefooted, I was surprised to see him fall back in real pain. I intended to kick his shin, but aimed too high.
Scout does not really understand what is going on between the men and her father, and this adds to the levity of the moment. Her polite and innocent conversation with Mr. Cunningham about entailments and hickory nuts provides both a charming and unexpected bit of humor for both the reader and the men at the jail. The Cunninghams, who had come to lynch Tom Robinson, stand silently "with their mouths half-open." Scout's father's
... attention amounted to fascination. Atticus's mouth, even, was half-open, an attitude he had once described as uncouth.
The humor provides the reader with a bit of relief during a serious scene, and it provides the lynch mob with a reason to think twice about their murderous motives.
Lee repeats this style again during the trial, when Scout and Dill take a break from the serious proceedings to have a talk with Dolphus Raymond.
Scout being humorous when dealing with Mr. Cunningham. She seemed to be a bit naive on which subjects she should and shouldn't talk about with him and the way she was conversing with him could be a little humorous. It all depends on which way you look at it.
well i think that she wanted us to know the setting and mood at the front of the jailhouse.