I'd say around high school age is optimal. Before that, kids should definitely be active and can enjoy exercise and sports, but weight training is not a good idea in younger kids as it can negatively affect the way they grow and develop.
Even at high school age, I would recommend anyone thinking about getting into weight lifting focus initially on proper form and technique rather than weight. The focus on building up muscle mass is much safer once your bones and stuff are done growing.