Hawthorne belonged to a group of authors, including Melville and Poe, who were known as anti-Transcendentalists, or Dark romantics. This is because their views of the world were at variance with the views of the Transcendentalists - of Emerson and Thoreau, for example. These writers placed an emphasis on Original Sin and the inherent wickedness of human beings. Thus Dark Romantic literature always features at least some of the following ingredients: the conflict between good and evil, the psychological effects of guilt and sin, madness in the human psyche. The attempt of Dark Romantics can be summarised as to strip away the acceptable and respectable veneer of human nature and reveal the blankness, hypocrisy and evil that lurks not too far beneath.
Considering this sketch of anti-Transcendentalist ideas, it becomes clear that a number of these aspects fit in to "Young Goodman Brown." This is a story that seeks to show the evil inherent in all of us through establishing the hypocrisy of the Puritan elect in Goodman Brown's locale. Likewise the fact that everyone needs to make the visit to the woods at least once indicates that evil is an inherent part of the human condition. We could also say that the impact of this experience on Goodman Brown and his inability to accept the fact of evil in all humans illustrates how other forms of evil can operate in Puritan society, for he ruins his own life and that of his wife through his depression.