To get him to admit that he slept with Hester.
Roger Chillingworth wants revenge on Reverend Dimmesdale for having an affair with Hester Prynne. He seeks to torment Dimmesdale as he believes Dimmesdale is partly responsible for the shame and suffering that Hester endured. Chillingworth aims to expose Dimmesdale's guilt and hypocrisy.
Hester Prynne reveals to Reverend Dimmesdale that Roger Chillingworth is her husband. She discloses their secret marriage and the fact that Chillingworth is seeking revenge on Dimmesdale for his adultery with Hester.
If I'm not mistaken, Hester did not meet Chillingworth in the forest. She met him in the prison and on a beach (I believe). During the first interaction, he asked her to pretend she didn't know him. During the second, she asked him to stop torturing Dimmesdale.
Chillingworth was gone for about two years before Hester cheated on him with Dimmesdale.
Chillingworth is pretty much a leech attached to Dimmesdale. Chillingworth is living and thriving off the pain/guilt he is inflicting on Dimmesdale to the point where he can no longer live after Dimmesdale's death.
Roger Chillingworth approaches Dimmesdale just as he invites Pearl and Hester to join him near the scaffold.
Dimmesdale is shocked and horrified when Hester reveals Chillingworth's true identity as her husband. He feels betrayed and manipulated by Chillingworth for disguising his true relationship to Hester. Dimmesdale also feels guilt and remorse for unknowingly being involved in the scheme that has harmed Hester.
Chillingworth visits Hester in prison to confront her about her relationship with Dimmesdale and to assert his control over her. He wants to extract information from her and further manipulate the situation to seek revenge on Dimmesdale.
Hester's revelation about Chillingworth's true identity as her estranged husband has a profound impact on Dimmesdale. It deepens his guilt and accelerates his deteriorating physical and mental state as he grapples with the knowledge that Chillingworth has been purposely tormenting him under the guise of friendship. This revelation further complicates Dimmesdale's internal turmoil and contributes to his eventual downfall.
Chillingworth notes that Dimmesdale's defense of Hester during her public shaming is a sign of his inner torment and guilt. He sees it as a sign of Dimmesdale's own involvement in the sin that they share with Hester.
Chillingworth blames Dimmesdale for Hester's sin of adultery. He believes that Dimmesdale is the father of Hester's child and seeks revenge on him for his part in the affair.
Chillingworth wanted to know the identity of Hester's lover, believing it was Dimmesdale. He sought this information in order to seek revenge on the man he believed had wronged him.