There is no clear indication about when children should begin fasting. What is very clear is that fasting is an obligation on adult Muslims. So, the question that spins off from that is that at what age does the child become adult? And this is not specified in the Quran.
The Quran speaks about children reaching the age of marriage, for example, but doesn't say what that age is in terms of years. A hadith says that when a child is 10 years old,we should require that they pray. But does that mean automatically that children should be required to fast when they're 10 years old? Muslim scholars have looked at that and said, "Well, wait a minute. The two obligations are not the same, because the prayer is an activity that could easily be done by children. Fasting is more rigorous It does not automatically translate that because the child should be praying at 10, the child should also be fasting at 10."
What exactly is the adult age then? Well, in ancient times people would have tried to think about when people are ready for marriage. So, a girl has her first menstrual period and then they think, "Maybe she's ready for marriage now." So they might think, okay, she's adult now. A boy may report that he had a wet dream and they might say, "It looks like he's ready for marriage." So, it looks like he has transformed from being a just an innocent kid to now into adulthood.
But there is also a difference between the level of physical biological development and the level of mental development. The Quran speaks about children growing up to achieve rushd which means a level of discernment, a type of intellectual development.
These are all gray areas. What we can say for sure is that for one thing, we should not have our children fast too early if medical experts advise against that, because we're not dealing with an obligation from God that will clash with medical information. In any case, there should be no clash, because even for an adult, if doctors tell us that it'll be unhealthy for a certain individual, given certain underlying conditions, to fast, then that individual has the option to feed a poor person instead of fasting. Or if one expects to get better, when one is healthy one will fast an equal number of other days.
With children, because there is the gray area about when exactly they reach adulthood, the leniency is even more possible. We should gradually introduce the children to fasting according to their age and their capacity. When they're younger, maybe they're just fast for a couple of hours. As they get older, we increase the number of hours almost synonymously with age, so that by the time they reach a level of development, both physically and intellectually, they can choose for themselves to fast as an obligation that they know is placed by God on adult Muslims. And of course, children want to play adults very early, so they want to say, "Yeah, I am grown up enough to do that." So, if they're ready to do that and they can physically withstand the rigors of fasting, then we shouldn't stand in their way, but we should give them every bit of encouragement.