I agree that Hawthorne seems a bit embarrassed or perhaps even a little guilty by association when regarding his Puritan ancestors. He is directly linked with the judge who condemned the witches in Salem, so his writing of The Scarlet Letter is generally considered a sort of peace offering or way of dealing with these strong emotions. He wrote several such pieces, including, but not limited to, the short stories "The Minister's Black Veil," "Twice-told Tales," and "Young Goodman Brown" which deal with guilt, religion, and the ramifications of behaving badly in society.
Check out the link below to find how the influence of Puritanism effected his life and his works.
It is generally believed that Hawthorne was somewhat embarrassed by his Puritan ancestors. His ancestor, Judge Hathorne had been a judge in the Salem witchcraft trials. Hawthorne changed the spelling in his name, adding the "w" so the link with Hathorne would not be as clear. In addition, in the first chapter of "The Scarlet Letter" he uses grim imagery to describe the Puritans and their society. He also points out that this so-called utopian society was forced to build a prison in the earliest part of their history. A utopian society would not need a prison, as all people would be law abiding, good citizens. In the second chapter of the novel, he shows the judgmental, and unforgiving attitude the citizens have about sin. They have forced Hester Prynne to wear a scarlet letter "A" for adultery for the rest of her life. Ironically, they cannot see the hypocrisy in their own society and do not even suspect that the minister of the town would be the father of Hester's baby. Other short stories by Hawthorne like "The Minister's Black Veil" and "Young Goodman Brown" also examine this hypocrisy and veil of secret sin that is overlooked in this society supposedly "set on a hill" as an example of virtue and goodness.