Fiqh-us-Sunnah Volume 4, Funerals and Dhikr, Fiqh 4.089A.
The children of Muslims who die prior to the age of puberty go to Paradise. ‘Adi ibn Thabit reported that he heard al-Bara’ saying, “When Ibrahim, son of the Prophet died, the Prophet, peace be upon him, said, ‘Verily, he will have suckling in Paradise’.” (Bukhari) Al-Hafiz said in Al-Fath, “Bukhari indicates his view on this subject when he makes the statement that ‘they are in Paradise.” Anas ibn Malik reported that the Prophet, peace be upon him, said, “If any Muslim has three children and they die prior to reaching the age of puberty, Allah will cause him to enter Paradise on account of His mercy to them.”
It is clear from this hadith that those children who become a reason for others to enter Paradise, would themselves be in a far better position to enter it, because they are the real cause of the mercy of Allah.
As for children of non-Muslims, they are similar to the children of Muslims with respect to their entry into Paradise. An-Nawawi said, “This is the sound view held by the eminent scholars, and it is supported by Allah’s words, ‘We will not punish anyone until We have sent a Messenger.’ (Qur’an 17.15) Now if an adult is not punished for the reason that the truth did not reach him, it is far more reasonable to assume that a child will not be punished.” A report by Ahmad from Khansa, daughter of Mu’awiyah ibn Sarim, states that he related her aunt’s following account: “I asked, ‘O Messenger of Allah! Who will be in Paradise?’ The Prophet, peace be upon him, said, ‘Prophets will be in Paradise, martyrs will be in Paradise, and babies will be in Paradise’.” Al-Hafiz said that this hadith has a sound chain of narrators.