Ever sat in on a lesson that went way too long? The children were squirming. The teacher went on because what he was teaching was so important. If the children aren't paying attention, it doesn't matter how important the lesson is - they are not getting it. I like the old saying that, "You can only take in on one end what you can endure on the other."
So how do you determine how long a lesson to prepare? The general guideline that I have heard for preschoolers is that they will have an attention span in minutes that is roughly equal to their age. However, if the lesson is tailored well to their specific age group, you can usually safely double that. In fact, the more varied interaction there is throughout the lesson, the longer you can go and still maintain their attention. Just make sure that the interaction amounts to a change of physical position, participation or activity.
With older children, generally 18-20 minutes is just about right for a Bible lesson. But here again, if you put in various interaction that breaks the lesson up with related songs, memory verse review or other activities, you can go longer.
Be sensitive to the children's reaction during your lesson. If they start to lose attention, it may mean that it is time to wrap things up quickly and move on to another part of the schedule.