Throughout the conversation between Dimmesdale and Hester, Pearl is playing by the brook that runs through the forest. While this action seems insignificant, it reinforces several ideas from Romantic philosophy. Pearl embodies the youthful, innocent, and imaginative hero that is typical of the time period. She plays by the brook, in the rays of light that come through the forest, reinforcing her as an innocent child. The light is also used as a symbol representing revealed truth, which provides a contrast to Dimmesdale and Hester discussing in the dark their plans to keep their love and their sin a secret.
When I first read the previous poster's comment, I was relunctant to agree. To be honest, I often don't find moralizing in novels all that appealing, and as a reader I suppose I try to see their secret love affair not as a sin in itself but rather as something that is punished by society as a sin. While I think that I don't have to abandon my perspective entirely, I also have to agree with the previous poster's comments.
Here are some details that reinforce the contrast between good and bad, Pearl and the adults, etc. Pearl can chase after and catch the rays of light, but they move away when Hester approaches. Similarly, at one point in his discussion with Hester, Arthur perceives the brook as some sort of division between worlds, separating Hester and him (who are on one side) from Pearl (who is on the other side).