Pearl is a constant reminder of sin because she is the "love child" born of the secret and illicit union of Hester and Dimmesdale. She is the reason Hester was exposed as a sexually "impure" and is now shunned by society and shamed by having to wear the scarlet letter.
Nevertheless, Pearl is a joy to Hester because of the child she is. She is pure and innocent, her soul white like a pearl. She is a child of nature, and she has a way of seeing through the surface of things to discern true goodness. She is likened to animals and sunlight.
Ironically, a union that in the eyes of society has left Hester stained "red" as a harlot has produced a "pearl-like" child of innocence and purity. Pearl calls into question just how sinful Hester and Dimmesdale's union really was.