How is Pearl both a constant reminder of sin and a joy to Hester?
Pearl is a constant reminder of sin because Hester conceived her through adultery, and she is always around. Her very existence is evidence of sin.
She's a joy because she's a fine and loving child, and because Hester loves her dearly.
Hester loves Pearl because she is her child and brings her such joy in her life. However, Pearl was conceived due to Hester's adultery with Dimmesdale, so she's a constant reminder of Hester's shame, of why she must wear the scarlet A.