Jem recognizes, as most readers probably do, that Nathan Radley cements the secret knothole of the oak tree to prevent further contact between his brother, Boo, and the Finch children. When Jem asks Boo's brother, Nathan tells him that the
"Tree's dyin'. You plug 'em with cement when they're sick. You ought to know that, Jem.
It is Nathan's way of symbolically treating the sickness that he believes still affects Boo. Somehow, Nathan must have witnessed Boo placing items in the tree late at night; or possibly, he saw Jem and Scout retrieving the items. Nathan may have even questioned Boo about it. In any case, he closed the opening, preventing Boo's only form of contact outside the Radley House. Although Jem figures it was out of pure meanness, Nathan probably thinks that Boo's contact with children might be considered improper, so he took the action he did. Jem isn't sure about the reason until Atticus points out that the tree is healthy.
"Look at the leaves, they're all green and full, no brown patches anywhere--... The tree's as healthy as you are, Jem."