Are the people, objects, and events in Goodman Brown's adventure invested with enough consistent symbolic resonance to justify calling his episode in the woods an allegory? Consider Brown's wife, Faith, as an allegorical figure. What do you make of Brown's statements "I'll cling to her skirts and follow her to Heaven" and "Faith kept me back awhile"? In the same light, consider the other characters Brown meets in the forest, the sunset, the walk into the forest, and the staff "which bore the likeness of a great black snake."
One of the lingering questions of the story is whether Brown dreams or lives the adventure in the forest. However, in the context of the themes of guilt and sin (and what it means to Brown himself), the dream is as significant as a real experience. And in the context of defining the story elements as an allegory, the symbolism stands whether as part of a dream or reality. In fact, the symbolism can be quite blunt. Brown's wife "Faith" is a good example.
Faith is his wife's name but also represents his faith in God and his faith in goodness in human (including his own) nature. When he claims he will cling to her and follow her to Heaven, he means this quite literally and metaphorically (allegorically). He is about to leave for the forest and wants to reiterate his loyalty to Faith and his loyalty to faith in God and good human nature. Again, "Faith kept me back a while" is meant literally and figuratively. He uses his faith in order to resist the temptation to face and perhaps be fundamentally affected by the evil and darkness that he might find in the woods.
The staff resembles a snake and this is clearly a symbolic reference to the Devil, portrayed by a serpent in the Garden of Eden. In this Biblical story, Adam and Eve are tempted to disobey God, just as the devilish man in the forest symbolizes the devil and Brown's own fallibility (note that the narrator says Brown and the old man could be father and son). Like Adam and Eve, Brown is continually tempted to go deeper into the darkness, away from his "faith."
Brown the "good man" is tempted by evil to stray from his "faith" in goodness and God. This is the extended metaphor or allegory. Portraying other characters as witches or those who worship the devil is also part of the overall allegory that symbolizes the sin and guilt hidden in these seemingly ethical, Christian people. Brown considers himself a "good man" but then discovers his own weakness in straying from God. He comes to see the evil in himself and others. He is so affected (and too unforgiving) that he has lost his faith.