In The Scarlet Letter, Nathaniel Hawthorne focuses on moral and theological issues and criticizes the hypocrisy of Puritan New England. The basic situation is that Reverend Dimmesdale and Hester Prynne have committed adultery, the result of which is the birth of their daughter Pearl.
One thing Hawthorne seems to be criticizing is divorce laws; had Hester been able to divorce her husband and remarry legally, the story would not have been tragic.
Next is the hypocrisy of the clergy, Reverend Dimmesdale included, who though themselves not free of sin, seem to take it upon themselves to judge others (cf. Jesus’ statement about the woman taken in adultery, “Let he who is without sin cast the first stone”).
Finally, it seems that repressive nature of the society is what leads to such things as adultery in Hawthorne’s view, because there is no other outlet for Hester’s creative or sensual nature.