Both of Hawthorne's works—the novel The Scarlet Letter and the short story "Young Goodman Brown—are set in the early American colonies in the seventeenth century, and both focus on characters in the strict Puritan society of that time and place.
"Young Goodman Brown" is an allegory, which means that each element of the story represents something beyond the literal meaning. Young Goodman Brown represents the everyman, and his journey into the woods can be said to symbolize every person's maturation. He learns in the woods that even the seemingly purest members of his society are sinners. He even sees his own wife, Faith, who he idolizes as the most innocent and perfect person he knows, at the ceremony in the woods. Her pink ribbon could symbolize a mix of purity (white) and sin (red). Everyone in the town is at the ceremony, which means that everyone sins or has a dark side. Young Goodman Brown, however, cannot accept this truth about human nature, and his life is ruined by the knowledge.
As a novel, The Scarlet Letter is more complex than the short story and lends itself to multiple themes. Nonetheless, sin is a common concern of both texts. In the novel, Hester has sinned by having an affair and bearing a child out of wedlock. She is publicly shamed and forced to wear an A on her chest so everyone knows she is an adulterer. The key difference here is that her sin is out in the open, while in Young Goodman Brown, sinners' wrongs are hidden in the daytime under a veneer of respectability. The secrecy of sin does emerge in The Scarlet Letter through the character of Reverend Arthur Dimmesdale. He is the man who had the affair with Hester and impregnated her. However, he faces no public shame and is able to maintain his position as a holy and admired figure in the town. This is because his sin remains hidden, as the sins of the townsfolk in "Young Goodman Brown." The difference is that his sin tortures him internally and eventually leads to his death, while the sinners in "Young Goodman Brown" seem to carry on with their everyday lives without the guilt that Dimmesdale feels.
Ultimately, similar settings and themes are present in both of Hawthorne's works. He was interested in Puritan history and the Salem witch trials, as he had at least one relative involved in that tragic event. The Scarlet Letter takes the common theme of sin further and makes it more complex than does "Young Goodman Brown."
Both The Scarlet Letter and "Young Goodman Brown" are stories about sinners. In The Scarlet Letter, Hester Prynne and the Reverend Arthur Dimmesdale sinned by sleeping together when no one knew if Hester's husband was still alive. Hester committed adultery, and because she became pregnant and could not hide her sin, she was punished. Dimmesdale, however, attempted to hide his sinfulness and, consequently, his guilty conscience caused him such pain that he died while still a young man, seven years later. In "Young Goodman Brown," a young man goes into the woods for some dark purpose, intending to recommit himself to his faith the next day. Although he does eventually turn away from the Devil, the fact that he turned his back on God by going into the woods in the first place renders him unable to find his faith again, and he lives a miserable life once he returns home.
Both stories explore the effects of sin on the sinner. Hester owns up to her sin, and she is able to bear it. Dimmesdale does not confess his sin for a very long time, and his guilt eats away at him. Goodman Brown does not even think what he is doing is sinful since he plans to return to faith in the morning, but because of his decision to walk away from faith (symbolically represented by his wife, Faith), he too has committed a sin and really fails to accept responsibility for it. Thus, we see that the person who takes responsibility is able to recover her life to some degree: people in the town even begin to say that Hester's scarlet letter means "Able" instead of "Adulterer". On the other hand, the people who do not take responsibility for their sins never recover, and those sins eat away at them until they die.
The primary similarity between Nathaniel Hawthorne's The Scarlet Letter and "Young Goodman Brown" is that both stories deal with the basic conflict of good versus evil. In each story, an innocent person is faced with the temptation to sin; in The Scarlet Letter, Hester Prynne and Reverend Dimmesdale give in to temptation and are faced with the consequences of their actions, which are different for each of them. In "Young Goodman Brown", Brown is tempted, but does not succumb. Both stories include main characters who witness the presence of evil in those who are commonly accepted as good and moral people, but are actually the opposite.