Muslim may certainly beseech Allah in their prayers for the benefit of non-Muslims. There can be no question that we should beseech Allah to guide them to faith.
The Prophet (peace be upon him) said: “O Lord, support Islam by the most beloved `Umar to you.” This is a supplication for guidance for one of the two persons named `Umar to accept Islam. This took place just before `Umar b. al-Khattâb embraced Islam.
The Prophet (peace be upon him) said in another hadîth: “O Lord guide my people, they do not know (the true path)”
There is only one matter that we are not supposed to beseech on their behalf – that is for Allah to forgive them while they remain upon unbelief.
This prohibition is established by the following verse of the Qur’ān: Allah says: “It is not fitting for the Prophet and those who believe, that they should pray for forgiveness for the polytheists, even though they be of kin, after it is clear to them that they are companions of the Fire.” [Sûrah al-Tawbah: 113]
This verse was revealed on a particular occasion. The Prophet’s beloved uncle, Abû Tâlib, was dying and he had not accepted Islam. The Prophet (peace be upon him) pleaded with his uncle to accept Islam on his deathbed. To the Prophet’s dismay, Abû Tâlib refused to do so. Nevertheless, the Prophet (peace be upon him) promised his uncle: “I will beseech Allah’s forgiveness for you as long as Allah does not forbid me to do so.” It was after this that the above verse was revealed. [Sahîh al-Bukhârî]
We also have where the Prophet (peace be upon him) said: “I asked Allah to permit me to visit my mother’s grave, and He granted me permission to do so. Then I asked Him to permit me to beseech His forgiveness for her, but He did not permit me to do so.” [Musnad Ahmad]
As for our supplications for non-Muslims regarding worldly matters – like prosperity, health, recovery from illness, and other concerns – this is a virtuous act for the Muslim. Indeed, it is most emphatically encouraged where the non-Muslim happens to be a close relative, and especially when that person is a parent.
We would say that as long as the non-Muslim is not at war with the Muslims or actively engaged in bringing harm to the Muslims, we may beseech Allah for that person’s success and welfare in this world. This comes under the general meaning of the following verse where Allah says: “With respect to those who neither fight you on account of your faith nor drive you form your homes, Allah does not prevent you from doing good for them and treating them equitably. Indeed, Allah loves those who behave equitably.” [Sûrah al-Mumtahanah: 8]
When a non-Muslim is ill or in need, our supplicating on his or her behalf is a way of doing good for that person. It is a noble act. It is a virtuous deed, just like lending that person a helping hand or fulfilling that person’s material needs are virtuous acts.
In the same way, the jurists have agreed that we can console non-Muslims on the death of their loved-ones by beseeching Allah to bless the believed with patience and with good in this world. However, we are not supposed to beseech Allah’s spiritual rewards upon them or for the deceased as long as the people concerned are unbelievers.
Regarding supplications on behalf of non-Muslims for healing and recovery, we have the following account related in Sahîh al-Bukhârâ and Sahîh Muslim:
Once some of the Prophet’s Companions, Abû Sa`îd al-Khudrî among them, approached an Arab township and requested from them the hospitality that was then the custom. The people of the town refused them hospitality. The Companions had to make camp outside of the town’s limits. While they were in these circumstances, the village chief was stung by a scorpion, and the townspeople approached the Companions, asking: “Do you have any medicine or healing incantation for our chief?”
The Companions replied: “Since you refused us even the most basic hospitality, we will do nothing for you without payment.” The townspeople agreed to pay them a certain number of sheep if their chief recovered from the bite.
The Companions then began to recite Sûrah al-Fâtihah over the wounded man, blowing over his wound. The chief was relieved of his pain and gave them the sheep they were promised.
The Companions were unsure of whether they should profit from a supplication and they said: “We will not take this wage until we first ask the Prophet (peace be upon him) about it. When they told him what happened, he laughed and said: “How did you come to know that (Sûrah al-Fâtihah) is a prayer for healing? Take the sheep and allow me to share with you in them.
The Companions recited the Qur’ān as a supplication to Allah to heal the chief of that township. This shows that it is permissible to beseech Allah to cure a non-Muslims illness.
Of course, someone might argue that nowhere in the account does it mention that the people of that town were non-Muslims, though the context strongly indicates that they were non-Muslims. Still, the general permission and encouragement to showing kindness and doing good for all people, like we have in the verse mentioned above, is sufficient to establish the permissibility of beseeching Allah in prayer for the welfare of others, regardless of their faith.
And Allah knows best.