IMO it's a matter of maturity. My son's first time shooting was when he was 6, he's now 7 and comes to the range regularly with us. I feel he is quite mature for his age.
He shoots a .22 semi auto pistol, .22 semi auto rifle and a .22 bolt action rifle. He is familiar with ACTS and knows how to PROVE each of the 3 guns he uses (with my help obviously, but he knows the basics). He understands as fun as guns are they will also create a world of pain for a lot of people of misused, and he takes this seriously.
Like any kid his age, he does forget and make mistakes. That's where my job comes in, it's up to me to supervise him and make sure he is doing everything safely and responsibly. If I see he is starting to fall out of line all it takes is a gentle reminder and he's back to business.
Usually though when I see he is starting to get bored and lose focus that is when we pack up to leave. It means some short range visits sometimes but that's ok, as long as he has fun.
I think as long as they are mature enough to have fun while understanding that guns are not something to fool around with, and are capable of handling it safely, then they are old enough in my books. Keeping a close eye is the key, muzzles can go a bad direction in a damn hurry with some kids.
All that being said, there are some older kids I wouldn't let come any near a range... it all comes down to the individual.