The ambiguity of Nathaniel Hawthorne's story, "Young Goodman Brown," is the very key to his message. Just as in Hawthorne's "The Minister's Black Veil," and his seminal novel, The Scarlet Letter, the ambiguity of Puritanism is exposed. And, with this exposure comes the theme of the hypocrisy of Puritanism in which one never is certain whether one is "elect" or "condemned."
The main ambiguity of "Young Goodman Brown" arises from the question posed by Hawthorne as narrator:
Had Goodman Brown fallen asleep in the forest and only dreamed a wild dream of a witch-meeting?
If the experience of witnessing the black mass is real, Brown loses faith in the Puritan community because they are hypocrites. However, if he has merely dreamed "a wild dream of a witch-meeting," then his loss of faith is of his own doing; it is because of the depravity of his own soul, his own hypocrisy, and not because of the actions of others. At any rate, as a Puritan, it is "a stern, a sad, a darkly meditative, a distrustful, if not a desperate man" that Brown becomes because of the uncertainty of Puritanism in which virtue is only a dream. Blinded by his Puritan-Calvinistic conflict, becomes a hoary hypocrite who in his own secret sins sees sins in others:
...they carved no hopeful verse uon his tombstone, for his dying hour was gloom.
To me, the main themes of this story are that A) all people have the capacity to be evil somewhere within them and B) that we must not lose faith in other people simply because they are capable of doing evil.
In the story, Young Goodman Brown has no choice but to do into the woods. This (you can argue) shows us that he has this evil part of him that cannot be completely resisted. All people have this, as is shown by the fact that everyone else is there in the forest as well.
But Brown does not have to react the way he does. Faith, his wife, does not react in this way. She has faith -- she knows that he is mostly good and continues to accept and love him. Sadly for him, Brown cannot do the same. Instead, he becomes disenchanted and alienated from his community and even his wife. This shows us that we must accept our flaws and those of others if we are to lead a happy life.
We are flawed beings and we must accept that and live with that reality.