Praise be to Allah.
There is nothing wrong with the mother having a small party on the occasion of her daughter reaching the age of seven years, if she intends thereby to encourage her daughter to pray. That is for the following reasons:
This party is not a religious celebration or festival that will be repeated, so it comes under the heading of customs and traditions which, in Islamic fiqh, are regarded as permissible in principle, according to the guidelines on customs and traditions.
Imam ash-Shaatibi (may Allah have mercy on him) said:
With regard to customs and traditions, it is prescribed to look at the basis for them and not to justify them on the basis of religious texts. This is in contrast to acts of worship, in which it is well-known that the opposite principle applies (that they must be strictly based on the texts).
End quote from al-Waafiqaat (2/523)
On our website we have previously mentioned the guideline that the principle with regard to customs and traditions is that they are permissible, in several answers which you may see by clicking on the following numbers: 135458 and 149278.
This type of educational methods comes under the heading of means and methods, in a broad sense, that Islam allows and shows lenience towards, and leaves up to people and whatever they may come up with that is appropriate to their social and cultural environment. Encouraging someone to pray and persist in doing religious duties is one of the aims of sharee‘ah and the means of fulfilling that is also prescribed, whether it is by means of direct exhortation, or by means of fun and games, or by academic methods, or by celebrating with family and friends. All of these are Islamically acceptable means of attaining a shar‘i aim, and the means come under the same rulings as the ends.
It makes no difference whether the encouragement comes before teaching the prayer or after teaching the prayer. If people have no objection to rewarding a child for persisting in prayer, then they should have no objection either to having a small party in the child’s honour, to announce and motivate him, and to announce the beginning of a new stage in his life.
It is proven from the Sahaabah (may Allah be pleased with them) that they used the means that were available at that time for the purpose of remaining steadfast in worship. It was narrated that ar-Rubayyi‘ bint Mu‘awwidh (may Allah be pleased with her) said: After that, we used to fast on this day [i.e., ‘Ashoora’], and we would make our children fast too. We would make them toys out of wool, and if one of them cried for food, we would give (that toy) to him until it was time to break the fast.
Narrated by al-Bukhaari (1960) and Muslim (1136)
This indicates that one may use various educational methods and it is permissible to come up with whatever he thinks is appropriate, and that this is not a matter that is restricted to what is mentioned in the texts; rather the matter is broad in scope, according to what is appropriate in any given situation.
Among the types of feasts and celebratory foods, the fuqaha’ have mentioned food that is offered when a child completes the Qur’an. This is done to show happiness and gratitude after attaining some religious virtue, even though there is no basis for doing this in the Sunnah.
Finally, it is not appropriate to be so strict with regard to such matters, so that that does not result in people being put off from religion or lead to being too strict with people, to the point that religion becomes too hard for people. Islam, which is easy-going, does not object to any customs or traditions except those which are corrupt or lead to corruption, in which case you will find that most scholars are agreed on the reason for the prohibition of that custom.
But if there does not seem to be any cause of corruption, then in that case talking about prohibition is reckless, and one should be very careful and think very hard lest the one who forbids it ends up doing something that the mushrikeen did, for which Allah criticised them in the verse in which He says (interpretation of the meaning):
“Say: ‘Bring forward your witnesses, who can testify that Allah has forbidden this. Then if they testify, testify not you (O Muhammad (blessings and peace of Allah be upon him)) with them. And you should not follow the vain desires of such as treat Our Ayat (proofs, evidences, verses, lessons, signs, revelations, etc.) as falsehoods, and such as believe not in the Hereafter, and they hold others as equal (in worship) with their Lord’”
And Allah knows best.