I think the main theme in <em>Young Goodman Brown</em> is how sin and evil is an unavoidable part of humanity, it can be found in all the people we have taken as good and an example of rectitude. And how it can be found within ourselves as well, even in the smallest actions we don't think about. Such as Brown following this man he trusts as good into the woods, moved by curiosity, when he knows he shouldn't do it.
A great passage that works as an example of this is:
" "There," resumed the sable form, "are all whom ye have reverenced from youth. Ye deemed them holier than yourselves, and shrank from your own sin, contrasting it with their lives of righteousness and prayerful aspirations heavenward. Yet here are they all in my worshipping assembly. This night it shall be granted you to know their secret deeds: how hoary-bearded elders of the church have whispered wanton words to the young maids of their households; how many a woman, eager for widows' weeds, has given her husband a drink at bedtime and let him sleep his last sleep in her bosom how beardless youths have made haste to inherit their fathers' wealth; and how fair damsels - blush not, sweet ones - have dug little graves in the carder, and bidden me, the sole guest, to an infant's funeral. By the sympathy of your human hearts for sin ye shall scent out all the places - whether in church, bed-chamber, street, field, or forest - where crime has been committed, and shall exult to behold the whole earth one stain of guilt, one mighty blood spot. Far more than this. It shall be yours to penetrate, in every bosom, the deep mystery of sin, the fountain of all wicked arts, and which inexhaustibly supplies more evil impulses than human power - than my power at its utmost - can make manifest in deeds. And now, my children, look upon each other."
They did so; and, by the blaze of the hell-kindled torches, the wretched man beheld his Faith, and the wife her husband, trembling before that unhallowed altar."
Here the Devil is explaining his new followers how evil can be found in the most righteous people. And when Brown lifts his eyes to find his wife Faith, it's a metaphor of how our faith cannot saved us from committing sins, because the ones who built such beliefs were sinners themselves, and so most religions are based on lies.