Hawthorne discusses several topics in his short story/allegory "Young Goodman Brown"--alienation from society; destructive effects of guilt; women whose lives are ruined by the folly of men--I would argue that the over-arching theme of the story is the destructive effect of Puritanism on the individual, especially the concept that all men (and women, of course) are inherently sinful from birth.
Goodman Brown, an average Puritan young married man in Salem, Massachusetts, has a dream in which he decides to visit the "dark side," a probably unconscious desire to rebel against the restrictive, harsh belief system in which has lived. He has been taught, among other things, that mankind is born in sin and is subject to temptation by Satan in many ways. He also knows that he is predestined to go to Heaven or Hell and that, for the most part, what he does in this life will not change his final destination after he dies.
After having experiences in the forest in which his Puritan world is turned upside down--he meets Satan; he learns that very upright Puritan leaders in his life are Satan's converts; his own wife, Faith, who represents faith, is also on her way to join Satan's devotees--Young Goodman Brown completely loses his own faith,
'My Faith is gone!" cried he after one stupefied moment. 'There is no good on earth, and sin is but a name. Come, devil; for to thee is this world given.'
He hurries to Satan's ceremony in the forest, and, during the ceremony, he tries to save Faith by telling her to "look up to heaven, and resist the wicked one," but he is unable to save himself from the belief that all men and women--no matter how righteous they may appear--are not just sinful but in league with Satan.
Goodman Brown, after this experience, is "a stern, a sad, a darkly meditative" man who died in "gloom." His puritan belief system, which requires him to believe that he and everyone around him are sinful, blocks out the evidence of his eyes and experience that there are good people all around him (Faith, Goody Cloyse, Deacon Gookin). Instead, his very strict interpretation of the Puritan belief system leads him to conclude that there is nothing good under the sun.