Hawthorne purposely sets “Young Goodman Brown” in the middle of a dark Salem forest at night. This setting is used in order to underscore the characters’ descent into evil and to expose the theocratic community’s hidden nature.
Puritans were known for their strict adherence to the Bible. They did not condone leisurely activities, especially if they took place in the forest. Most avoided the forest as they feared it was the lair of the devil. Therefore, Goodman Brown’s trip into the forest is immediately a sin to be condemned. A strict Puritan would have no reason to enter the darkness—unless he intended to sin.
Because Goodman Brown meets many of the townspeople there, it is clear that Hawthorne is illustrating the darkness that exists within everyone; all people in the community are sinning, as represented by their presence in the forest. Outwardly they pray and declare their strict allegiance to God. In truth, they are the very sinners they themselves condemn. No one is exempt from this hypocrisy, even the title character's wife Faith, whom Goodman Brown believes to be pure and good. Her name suggests her adherence to religion, but she too falls prey to the temptations of the forest.
In the course of the story, the narrator remarks that “the fiend in his own shape is less hideous than when he rages in the breast of man.” By seeing the devil in his community members, who he thought to be holy, Goodman Brown is truly shattered. A truly holy community would avoid the darkness, but the people seem to embrace it. Thus, setting illuminates character and theme.