Suspense is a feeling of excitement, created by foreshadowing and mood.
Lee creates suspense first because it is dark. It’s Halloween, which is a kind of creepy time of year for kids. She never directly describes anything. It is just heavy breathing and bumps when the kids are attacked. We never know what has really happened until they get home, and then we find out the true story.
When Scout and Jem are attacked going home from the pageant, Lee does not give us specifics. Instead, she gives us the mood.
Still but for a man breathing heavily, breathing heavily and staggering. I thought he went to the tree and leaned against it. He coughed violently, a sobbing, bone-shaking cough. (Ch. 28)
This creates suspense, because we do not know exactly what is happening. Who is the man? Why is he breathing heavily? Are Scout and Jem in danger?
There actually is a deadly fight going on, between Boo Radley and Bob Ewell, but we do not have details. They are fed to us in inches.
Lee foreshadows the danger that Scout and Jem are in when Bob Ewell threatens Atticus and his family.
It was Miss Stephanie's pleasure to tell us: this morning Mr. Bob Ewell stopped Atticus on the post office corner, spat in his face, and told him he'd get him if it took the rest of his life. (Ch. 22)
Atticus is not worried about this, and apparently thinks Ewell is harmless. He underestimates the wound to Ewell’s pride. Yet it foreshadows Ewell’s attack and builds suspense. Another element building suspense is the fact that Scout is not escorted to the pageant by her father, or any adult. Not only that, Lee has Scout herself tell us that there was trouble that night.
After that, it didn't matter whether they went or not. Jem said he would take me. Thus began our longest journey together. (Ch. 27)
So it’s dark. There are no adults around. There is a known threat made against the family, and Scout’s movement is inhibited.
Then, Jem also thinks they are being followed.
""I hear it when we're walkin' along, but when we stop I don't hear it." (Ch. 27)
Scout calls and no one answers. Then Scout hears breathing. We don’t know who it is. There is a scuffe. Scout is dressed in a ham costume, so her vision is obscured, in addition to it being night. She also cannot move very well (or run). She is basically a sitting duck.
After the children return to the house it transpires that Ewell attacked Jem and broke his arm, and Boo (Arthur) Radley killed Ewell to protect the children. Atticus is very flustered by the situation, at first thinking that Jem killed Ewell.
Heck Tate and Atticus decide that, to protect Ewell from publicity, they will say that Bob Ewell fell on his knife. Boo does not like the spotlight. He was protecting the children, and he came out despite the fact that he never comes out, at great personal risk.
The reader knows that Jem is going to break his arm from the beginning of the book. Now we know when, and why. This incident brings all of the plot lines of the book together in an exciting and memorable way, and shows that Scout has grown up as she greets Boo Radley and thanks him for saving her life.