There are several themes in Nathaniel Hawthorne's The Scarlet Letter.
The theme of "identity" is identified when Roger Chillingworth tries to learn who Hester's lover is. Chillingworth uses figurative language in a metaphor where he compares the "A" that Hester literally wears on her dress to the "A" her lover wears figuratively on his soul:
He bears no letter of infamy wrought into his garment, as thou dost; but I shall read it on his heart.
(Ironically, Chillingsworth speaks to the theme of "identity" again when he asks her to keep his identity a secret from the townspeople:
Thou hast kept the secret of thy paramour. Keep, likewise, mine! There are none in this land that know me. Breathe not, to any human soul, that thou didst ever call me husband!)
The theme of change and transformation is also described in the story. Hawthorne uses personification as Hester thinks of Dimmesdale, Hester's lover. He has changed over time. He has become haunted and weighed down by guilt—his remorse is personified:
It was impossible to doubt, that, whatever painful efficacy there might be in the secret sting of remorse, a deadlier venom had been infused into it by the hand that proffered relief.
We see examples of guilt and innocence in discussion between Hester and her illegitimate child Pearl, and in this case personification is used regarding the sunshine:
"Mother," said little Pearl, "the sunshine does not love you. It runs away and hides itself, because it is afraid of something on your bosom. Now see! There it is, playing, a good way off. Stand you here, and let me run and catch it. I am but a child. It will not flee from me, for I wear nothing on my bosom yet."
Imagery is also present with the use of a simile which compares Hester's guilt (or innocence, based on how you perceive her "sin") as a snake.
It might be, too,—doubtless it was so, although she hid the secret from herself, and grew pale whenever it struggled out of her heart, like a serpent from its hole,—it might be that another feeling kept her within the scene and pathway that had been so fatal. There dwelt, there trode the feet of one with whom she deemed herself connected in a union, that, unrecognised on earth, would bring them together before the bar of final judgment...
Other themes include ambiguity, guilt and innocence (sin, identity and civilization). Symbols are often used to support themes, and literary devices provide added dimension to themes, making them clearer, and easier to identify and observe.