Writing a play is one good way to entertain the kids on a long afternoon!
Whether you are writing a play script for children and would like to publish it, or are just entertaining your children for the afternoon, the same process for creating the script is the same. You must be sensitive to age of your audience, the resources you have at hand and the interests of the children for whom you are writing. If you are writing a play for your own children, you can also engage them in the process by having them help make props and costumes, and contribute their own ideas to the story.
Assess the ages of the children for whom you are writing. Base your ideas for content on their ages, as well as their level of comprehension, keeping the plot very simple for younger kids. Choose a "moral" or a "lesson" for your storyline.
Brainstorm a general storyline. Consider how many characters you will have, where they are, how long their story will be and what their relationships to each other are. Keep in mind where you will be holding the play, because this could influence your story settings. Create a conflict, either between characters or within a character, as this is what drives most stories.
Outline the characters, plot, acts and scenes. Make descriptions of each character and develop their personalities by adding details about them and their lives. Develop the plot with the beginning, rising action, climax and falling action.
Write your play. Be aware of the language you are using, since it is for kids. Add stage directions as necessary. Denote use of props and costumes, including costume changes if there are any.
Make props and costumes for the play, if you'd like. Encourage the kids to help with this.
Keep in mind you are writing for children. Their attention span is short, so keep the play on the shorter side.
Although a good play always has a moral or lesson, it should not come across as a lecture. Be subtle in presenting the lesson you are trying to teach to make the experience enjoyable.