In Nathaniel Hawthorne's story, Goodman Brown experiences a total crisis of faith. While the authors leaves unclear whether Brown actually saw what he thought he saw, or whether his own guilt got the best of him is in some ways irrelevant. Part of the story's power, as well as its relevance to its colonial Salem setting, inheres in that very ambiguity.
Goodman sets off into the forest on an errand he does not disclose to his wife, but says he'll be right back. In the course of his adventure, he sees everyone whose good character he valued doing abominable things or represented as diabolical symbols. Even his own grandfather and his wife are not immune. Perhaps even worse, he sees himself fully participating in these evil acts.
At a certain point, it all vanishes. Was it all real? Did he pass out and come to after they left? Or was everything an illusion or a dream? Regardless, Goodman can never see the world the same way again. To him, the reality of what he saw is undeniable; all the others are flawed and sinful. The alternative—that his own dark mind sees sin everywhere, whether present or not—is perhaps too unpleasant for him to contemplate.
I think the principal reason for the massive change in Goodman Brown's personality is the way in which the people he has thought he could have massive trust in have been shown to be in league with the devil and massive hypocrites in terms of their Christianity. One by one, as he ventures towards his destination in the dark woods, it is clear that each of the saints of his community are shown to be in league with the devil as well. Note the way, for example, that overhearing the conversation between the deacon and the minister talking about devilry impacts Goodman Brown during the story:
The hoofs clattered again; and the voices, talking so strangely in teh empty air, passed on through the forest, where no church had ever been gathered or solitary Christian prayed. Whitehr, then, could these holy men be journeying so deep into the heathen wilderness? Young Goodman Brown caught hold of a tree for support, being ready to sink down on the ground, faint and overburdened with the heavy sickness of his heart. He looked up to the sky, doubting whether there really was a heaven above him.
Goodman Brown experiences such a change in his character because his thoughs of saintliness and holiness in others are shown, one by one, to be false. As he is confronted with the universal nature of sinful man, he becomes cold and cynical, as everything he has ever believed in about the essential goodness of humanity has been contradicted.