The fact that the attack takes place on Halloween night gives the whole evening a sense of foreboding. The weather is windy, and the sky is dark with no moon.
The children joke about their childhood fear of "haints" and have an initial scare from Cecil Jacobs in the dark. This raises their apprehension on the way to the pageant.
On the way home, the attack is preceded by the lonely call of a mockingbird, followed by a faint sound of shuffling feet behind them. By the time Bob Ewell strikes, the reader is definitely expecting something bad to occur.
The apprehensive mood that is a core part of the setting in chapter eight of To Kill a Mockingbird is largely because the events leading up to the attack are transpiring on Halloween. The weather on this day is described as "unusually warm" and there appears to be a strong wind and no moon, which leaves the children to walk to the school in the pitch black darkness.
Jem and Scout are also nervous as they make their walk due to the fact that they have to pass the Radley's home, with Jem asking Scout, "Ain't you scared of haints?" This seems silly to the children--an artifact of their past--and yet they still find themselves spooked when Cecil Jacobs jumps out at them in the dark.
The walk home from school that night after the performance is no better. Although the wind has died down, Jem senses that something is not right, persistently pausing because he thinks that he hears odd noises. Soon the children realize that it is the swish of trousers and the hard thump of footsteps following them. They take off running, but not fast enough to avoid attack by their mysterious stalker, Mr. Ewell.