Trees are used in this story as symbols representing specific people in the community. One particular tree is shown to be rotten on the inside, but apparently healthy from the outside - this tree represents Deacon Peabody, whose name is carved on the trunk, because he is said to be more concerned with other people's sins than his own. The imagery of the internally-rotting tree suggests that Peabody is metaphorically rotten on the inside, meaning that he is corrupted or unhealthy, but his exterior seems normal, as given by his role as a churchman, which contradicts his interior and may mislead others as to his intentions and nobility.
While this quote would be applicable to the tree that represents Peabody, none of the other trees are mentioned as being rotten on the inside, so this sentence probably needs to be revised to focus more broadly upon how the tree can serve as a symbol for a person. We might modify it to say, "Trees are like people, because a healthy exterior can disguise a rotten core".