In addition, the inclusion of names such as Young Goodman Brown and Faith provide the readers with clues to how these characters were to be perceived. In some cases, such as Young Goodman Brown's, the name is indicative as to his actual character. In others, such as Faith's and Goody Cloyse's, the names are ironic; while they could be symbolic of the respective faith and goodness of those characters, they are actually the opposite.
The colonists are Puritans (a Calvinist-focused version of Christianity). Hawthorne was fascinated by the Puritan legacy, and became very interested in historical accounts of the Salem Witch Trials and the abuse of Quakers after he discovered his ancestors had been involved in both. Hawthorne used historical references (in this case relating to the Salem Witch Trials) to give the piece a more "historical" feel, and also to help support his allegory.
He uses Young Goodman Brown's experience to explore (and in some cases, criticize) particular points of Puritan doctrine, such as predetermination/election (the idea that those who are "elected" to heave are predetermined before birth, as are those meant for hell), and the intolerance that led to the hysteria of the Salem Witch Trials. Using real names and places helps to support this exploration and give the reader the same sort of feeling he had when we began to dig through the historical documents (an example would be Cotton Mather's "Wonders of the Invisible World").