Islam orders the Muslim to be kind to everyone. Here, we would like to stress that there is nothing wrong with offering condolences to non-Muslims, especially when they are struck by calamities. This should be done to show kindness, mercy and compassion between the inhabitants of the earth.
No doubt, there are certain occasions, when offering condolences to non-Muslims will serve to show our peaceful coexistence with them, which is recommended. Allah, the Almighty says, (Allah forbids you not those who warred not against you on account of religion and drove you not out from your homes, that you should show them kindness and deal justly with them. Lo! Allah loves the just dealers.) (Al-Mumtahanah 60: 8). Islam permits a Muslim to offer condolences to non-Muslims, but naturally Muslims should take priority and should not be overlooked. A true and committed Muslim is not supposed to forget his fellow Muslims or to neglect them when offering condolences is required.
Sheikh Muhammad Al-Mukhtar Ash-Shinqiti, states: In Islam, it is permissible to offer condolences to unbelievers. This is a sign of the good character and manners of a Muslim. Many Muslim scholars have spoken about this point in their books such as Imam Ibn Al-Qayyim in his well-known book ‘Ahkam Ahl-Adhimah’. Having said this, it should be kept in mind that the permissibility to offer condolences to non-Muslims is not to be taken as an excuse to neglect our fellow Muslims. The problem here is not in offering condolences to non-Muslims, but in the behavior of some Muslims who are apathetic toward the pain and suffering of their Muslim brothers and sisters. The Prophet (peace and blessings be upon him) is reported to have said, “A believer to his fellow believing brother is like a building whose bricks cement each other.” Moreover, it is permissible to offer condolences to non-Muslims at times of bereavement, to visit them when they are sick, and to console them when a calamity strikes them. It was narrated that Anas (may Allah be pleased with him) said, “There was a Jewish boy who used to serve the Prophet (peace and blessings be upon him). The boy became sick, and the Prophet (peace and blessings be upon him) came to visit him. He sat at his head and asked him to, ‘Become a Muslim.’ (The boy) looked at his father, who was with him, and he (the father) said to him, ‘Obey Abu Al-Qasim (peace and blessings be upon him).’ So the boy became a Muslim, then the Prophet (peace and blessings be upon him) left saying, ‘Praise be to Allah who has saved him from the Fire.’” (Reported by Al-Bukhari)