Jem is the one who decides to turn Boo Radley's story into a game. Scout attributes this to his need to constantly prove to her that he is not afraid of Boo or his family. Essentially, the game is like a play. Dill is the father. Scout is the mother, and Jem is Boo. As the game progresses they alter it to come up with a kind of script. The following passages can be found at the end of Chapter 5.
"Jem parceled out our roles: I was Mrs. Radley, and all I had to do was come out andsweep the porch. Dill was old Mr. Radley: he walked up and down the sidewalk andcoughed when Jem spoke to him. Jem, naturally, was Boo: he went under the frontsteps and shrieked and howled from time to time. As the summer progressed, so didour game. We polished and perfected it, added dialogue and plot until wehad manufactured a small play upon which we rang changes every day.""It was a melancholy little drama, woven from bits and scraps of gossip and neighborhood legend: Mrs. Radley had been beautiful until she married Mr. Radley and lost all her money. She also lost most of her teeth, her hair, and her right forefinger (Dill’s contribution. Boo bit it off one night when he couldn’t find any cats and squirrels to eat.); she sat in the livingroom and cried most of the time, while Boo slowly whittled away all the furniture in the house.""When it was time to play Boo’s big scene, Jem would sneak into the house, steal thescissors from the sewing-machine drawer when Calpurnia’s back was turned, then sit inthe swing and cut up newspapers. Dill would walk by, cough at Jem, and Jem wouldfake a plunge into Dill’s thigh. From where I stood it looked real."
You can find a complete study guide for To Kill a Mockingbird at the link below.