Children will be rewarded for their good deeds. However, if a child committed a sin before attaining the age of puberty, then there is no punishment for him/her.
Sheikh M. S. Al-Munajjid, a prominent Saudi Muslim lecturer and author states the following: “Children will be rewarded for doing good deeds. Ibn `Abbas (may Allah be pleased with him) said: “A woman lifted up a child and said, ‘O Messenger of Allah, will his Hajj be counted?’ He said, ‘Yes, and you will be rewarded.’”
The author of Mawahib al-Jaleel fi Sharh Mukhtasar Shaykh al-Khaleel, Al-Qarafi said in al-Yawaqeet fi’l-Mawaqeet: “Children will earn a reward for the good deeds they do because of the Hadith of the Khath’ami woman, [who lifted up her child and asked the Prophet (peace and blessings be upon him) about his Hajj].” Ibn Rushd said: “According to sound opinion, the bad deeds of young children are not recorded but their good deeds will be recorded.”
Ibn `Abd al-Barr said in at-Tamheed, commenting on the first Hadith quoted therein, which is the Hadith of the Khath’ami woman: “… Abu’l-‘Aaliyah al-Riyahi said: `Umar ibn al-Khattab (may Allah be pleased with him) said, “The young child’s good deeds will be recorded but his bad deeds will not be recorded.”
The author of Mawahib al-Jaleel said concerning children entering ihram for Hajj and ‘Umrah:
“The scholars do not differ concerning the fact that children will be rewarded for whatever acts of obedience (to Allah) they do, and they will be let off for any bad deeds that they do. As well as this, any bad deeds they do deliberately will be counted as mistakes. It says in Mukhtasar al-Wadihah: ‘Hajj is not obligatory for boys and girls until boys reach puberty and girls begin menstruating, but there is nothing wrong with taking them for Hajj. In fact, it is recommended, and the Messenger of Allah (peace and blessings be upon him) did so.’”
Then he reported that Talhah ibn Musarif said: “It was a custom of the Muslims to take their children for Hajj and expose them to the mercy of Allah.”
Ibn ‘Abd al-Barr said in at-Tamheed that it is encouraged to take children for Hajj, and that the majority of scholars agree with this. He also said: “It is not strange that a child should earn a reward and status in the Hereafter for his Salah, Zakah, Hajj and other good deeds if he does them as they should be done, (because this is) the grace and mercy from Allah. It is like the fact that Allah shows mercy to the dead by rewarding them for acts of charity done on their behalf by the living. Do you not see that they (the scholars) have agreed that a child should be commanded to pray when he reaches the age of understanding and that the Prophet (peace and blessings be upon him) led Anas and the orphan in prayer? Most of the righteous successors said that Zakah must be paid on the property of orphans, and so it is impossible that they would not be rewarded for that. Their guardians and the one who does this on their behalf will also certainly receive a reward, as will the one who takes them for Hajj, as a blessing and mercy from Allah. It was reported that `Umar said: ‘Children’s good deeds will be recorded and their bad deeds will not be recorded.’ I do not know of anyone whose opinion is worth following, who said anything to the contrary.”
According to al-‘Ikmal, many of the scholars said: “Children will be rewarded for their acts of obedience (to Allah), and their good deeds will be recorded, but their bad deeds will not.”
It says in Awaa’il al-Muqaddimat: “In my view, the correct opinion is that they are both encouraged to do that and will both be rewarded for it (i.e., the child and his or her guardian). The Prophet (peace and blessings be upon him) said to the woman [who asked about the child’s Hajj]: “… and you will be rewarded.”
Ibn Jama’ah said: “According to the four schools of jurisprudence, children will be rewarded for their acts of obedience and their good deeds will be recorded, whether they are mature or not. This was reported from `Umar (may Allah be pleased with him). Some scholars report that there was a consensus (ijmaa’) concerning this matter. It is also indicated by what was already said under the heading of ‘virtues’ that the Prophet (peace and blessings be upon him) said: ‘The Jihad of the very old and the very young is Hajj and ‘Umrah,’ as well as the Hadith about the woman who lifted up a child.”