Chillingworth initially didn't know for sure. He wanted to find out who Pearl's father was. Chillingworth only suspected Dimmesdale because he seemed wracked with guilt. There was some emotional burden in Dimmesdale that was making him ill. So, Chillingworth moves in with Dimmesdale to be his personal physician. Still, it isn't until near the end, when Dimmesdale is sleeping, Chillingworth looks on Dimmesdale's chest and sees a crudely carved "A" . This was his atonement for fathering Pearl and not fessing up to his sexual indiscretions. Chillingworth then knew for sure.