In "Young Goodman Brown," Nathaniel Hawthorne writes about the dangers of basing a society on strict religious and moral values. Other themes include the loss of innocence and why some men choose to give in to evil.
Goodman Brown's decision to go into the forest to meet the devil stems from his weakened religious faith. When Goody Cloyse, Deacon Gookin and the minister almost catch him in the woods, Goodman Brown worries more about how his piety appears to other people than he does about meeting with the devil. Because he worries more about how these others feel, learning they are in league with the devil makes his decision easier.
Much like Adam and Eve were expelled from the Garden of Eden for giving in to their curiosity, Goodman Brown loses his innocence when he decides to go into the forest. He is now corrupt, whether he actually meets the devil or simply dreams their meeting. Whether the meeting happens matters less than how Goodman Brown feels about giving in to his dark side.
A third theme in "Young Goodman Brown" is his inherent fear of going into the forest. He doesn't fear the devil as much as he fears the unknown. Seventeenth century Puritans similarly feared the unknown and the unexplored New World. Their decision to dominate came from this fear, as does Goodman Brown's decision to give in to his desire and meet the devil.