There is shar'i matter of Islamic maturity, which is bulugh, and as you know the boy needs to experience one of three things for him to become baligh:
1. Having a wetdream.
2. Growth of coarse hair around the private parts.
3. Completion of 15 lunar years.
If one is not close to this boy, or does not directly ask him, they would not know if the boy is "baligh".
That is why there is something else that is very important, and that is the age of discernment (sin al-tamyiz).
This basically means that he has reached a certain age where he is able to discern between right and wrong, good and bad, and he understands his surroundings.
When a boy reaches such a stage, he must be taught and also treated like as if he is baligh. He cannot show his private parts, nor can anyone else see his private parts. His should pray, fast, and do other wajibat, and stay away from muharramaat. Hijab must be observed in his presence, and everything else related to what a mukallaf should do.
As for what age does a boy become discerning, in general, this is defined individually by noticing his conduct, mental capacity and behaviour.
And Allah knows best.