The statement above is (True), "Young Goodman Brown" is an Allegory, an example of an internal conflict between good and evil; depicting the innocence of young, good men, when they are tempted and then succumb.
An allegory is a story that can be decoded by several means to figure out the symbolism; and in "Young Goodman Brown" everything is symbolic and depict something else; starting by the very name of the main character, which is a symbol of a man who does good deeds.
The author, Nathaniel Hawthorne, uses plenty of symbols to display the moral aspects of society.