Jem and Scout harass Boo Radley because they are children, and they are behaving as children do. There is no malice in their intentions, they simply want to see Boo, even play with him if he would show himself. They are responding as any children would to the local ghost story. They want to see him for themselves, and discover if the stories are true. They are partially egged on by their friend Dill, who has a very active imagination, and enjoys speculating on Boo's personality and habits.
There are many different reasons why they stop playing their "Boo Radley" games. First, Atticus lays down strict rules forbidding them to act out the Radley family's life in any way. Then, Jem loses his pants in a midnight flight from the Radley house, where he, Scout, and Dill had been peeping in windows. After this incident the kids are terrified, and stay for awhile. However, once school starts, they begin finding gifts in a knothole in a tree. When they leave a thank-you note to the giver, they find the hole has been plugged with cement by Arthur Radley's brother. Finally, as the children grow, they leave their immature games behind. The trial of Tom Robinson takes over their lives, and they find there are deeper mysteries of humans than Boo Radley.