A person is not considered to be accountable until after reaching puberty. Before puberty he or she is not accountable, because the Prophet (peace and blessings of Allaah be upon him) said: “The Pen has been lifted from three: from the child until he reaches puberty, from the sleeper until he wakes up, and from the one who has lost his mind until he recovers.” (Narrated by Abu Dawood, 4402). Based on this, then a girl has to put on complete hijab when she reaches puberty.
There are three signs of puberty that males and females have in common:
1 – Nocturnal emissions (wet dreams)
2 – Growth of coarse hairs around the private parts
3 – Reaching the age of fifteen
In the case of females there is a fourth sign, which is:
4 – Menstruation
If one of these signs of puberty appears in a girl, then she is obliged to do all the obligatory duties and to avoid all haraam things. One of the obligatory duties is wearing hijab.
But the parent or guardian of a girl has to make her get used to doing the obligatory duties and avoiding haraam things before puberty, so that she will grow up with that and it will not be too hard for her to adhere to that after she reaches puberty. This is one of the basic principles of child rearing that are established in sharee’ah.
The Prophet (peace and blessings of Allaah be upon him) said: “Train your children to pray when they are seven years old, and smack them if they do not do so when they are ten, and separate them in their beds.”
Narrated by Abu Dawood, 495; Ahmad, 2/187, from the hadeeth of ‘Amr ibn Shu’ayb, narrated from his father from his grandfather.
Something similar was mentioned in the hadeeth of Saburah ibn Ma’bad which was narrated by Abu Dawood (494) and al-Tirmidhi (407). He said, it is hasan saheeh. The hadeeth was classed as saheeh by al-Albaani in al-Irwa’, 247.
Al-Bukhaari (1960) and Muslim (91136) narrated in their saheehs from al-Rubayyi’ bint Mu’awwidh the hadeeth concerning the fast of ‘Ashoora and when it was enjoined on the Muslims. In this hadeeth it says: “And after that we used to fast it – meaning ‘Ashoora – and make our small children fast, and we would go to the mosque and make them toys out of wool, and if one of them cried for food we would give them that toy (to play with) until iftaar.”
According to a report narrated by Muslim: If they asked us for food, we would give them the toy to distract them until they completed their fast.
Al-Nawawi said in Sharh Saheeh Muslim (8/14): This hadeeth describes training children to do acts of obedience and making them get used to doing acts of worship, but they were not accountable.
Ibn al-Qayyim said in Tuhfat al-Mawdood bi Ahkaam al-Mawlood (p. 162): “Even though the child is not accountable, his guardian is accountable and it is not permissible for him to enable him to do haraam things, so that he becomes used to them and it is difficult to wean him away from them afterwards.”
And Allaah knows best and is most wise.
So if a girl is approaching puberty, there is the fear that her not wearing hijab may cause young men to be tempted by her or her by them. Hence in this situation her parent or guardian has to make her wear hijab so as to prevent means that may lead to evil or immorality.
And Allaah knows best.