Though it definitely seemed to me that Pearl was meant to be viewed as the only good thing that came from Hester and Dimmsdale's affair, I suppose one way she might be interpreted as a punishment for them would be in the way she is always trying to make Dimmsdale confess to being her father and refuses to just let him remain in his venerable position. Hester tries to make her behave and just be satisfied with holding Dimmsdale's hand in the dark or standing with him in the forest, away from the judging eyes of the public, but Pearl refuses and continuously asks both Dimmsdale and Hester why they can't all stand together in front of the town. She also embarasses Hester in front of the governor by claiming, "I have no heavenly father!" She never fails to remind Hester of what she has done and what still must be done in order for Hester and DImmsdale to be fully redeemed.
On the contrary Pearl is the outcome and success (to some degree) of what happened to her mother and her lover did. It wasn't right but sometimes mistakes lead to good endings/rewards in life.