Assalamualaikum ustaz. What is the ruling of visiting our non-Muslim friends who are sick? Hope for an explanation.
Waalaikumussalam wrt. wbt.,
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions, and all those who follow his footsteps until the Final day.
We’ll begin with Allah SWT’s statement:
وَرَحْمَتِي وَسِعَتْ كُلَّ شَيْءٍ
“But My mercy encompasses all things.” 
Fakhruddin al-Razi stated that the above verse means that Allah’s blessings are general encompass everything on earth. While in the hereafter in the future, it is specific for only Muslims. 
The advantages of visiting a sick person
There are numerous hadiths that narrate the encouragement of visiting a sick person. Among the narrations is from Abu Musa al-Asy’ari RA, the Prophet PBUH said:
أَطْعِمُوا الْجَائِعَ وَعُودُوا الْمَرِيضَ وَفُكُّوا الْعَانِيَ
“Feed the hungry, visit the sick and free the captive.” 
Likewise, in a narration from Thauban RA, Rasullullah PBUH said:
مَنْ عَادَ مَرِيضًا لَمْ يَزَلْ فِى خُرْفَةِ الْجَنَّةِ حَتَّى يَرْجِعَ
“He who visits the sick continues to remain in the fruit garden of Paradise until he returns.” 
Such is also stated in a narration from Abu Hurairah RA, the prophet PBUH said:
مَنْ عَادَ مَرِيضًا، نَادَى مُنَادٍ مِنَ السَّمَاءِ: طِبْتَ، وَطَابَ مَمْشَاكَ، وَتَبَوَّأْتَ مِنَ الْجَنَّةِ مَنْزِلاً
‘”If anyone visits an invalid, one cries out from heaven, ‘May you be good, may your walk be good, and may you come to an abode in paradise!”’ 
Visiting a sick non-Muslim
Basically, the evidences which mentioned visiting the sick is in a general form, regardless of whether the sick person is a Muslim or non-Muslim. This matter is especially strengthened by an incident where the Prophet PBUH visited a sick Jew as narrated from Anas RA, he said:
كَانَ غُلاَمٌ يَهُودِيٌّ يَخْدُمُ النَّبِيَّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ، فَمَرِضَ، فَأَتَاهُ النَّبِيُّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ يَعُودُهُ، فَقَعَدَ عِنْدَ رَأْسِهِ، فَقَالَ لَهُ: أَسْلِمْ، فَنَظَرَ إِلَى أَبِيهِ وَهُوَ عِنْدَهُ فَقَالَ لَهُ: أَطِعْ أَبَا القَاسِمِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ، فَأَسْلَمَ، فَخَرَجَ النَّبِيُّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ وَهُوَ يَقُولُ: الحَمْدُ لِلَّهِ الَّذِي أَنْقَذَهُ مِنَ النَّارِ
“A young Jew who was a servant of the Prophet became ill the Prophet went to visit him and, sitting down by his head, said to him, “Accept Islam.” He looked at his father who was beside him, and he said, “Obey Abul Qasim.” So, he accepted Islam, and the Prophet went out saying, “Praise be to God who has saved him from hell.” 
The above hadith clearly shows that visiting a sick non-Muslim is permissible. Dr Yusuf al-Qaradhawi stated that visiting a sick person is included as a right of a Muslim on another Muslim. However, it doesn’t mean that a sick non-Muslim shouldn’t be visited. The activity of visiting one another regardless of race, skin color or religion is a practice based on the basis of humanity. Furthermore, Islam considers it as worship and a good deed to get closer to Allah SWT. Although the basis of faith between a Muslim and non-Muslim is different, however, the rights and responsibilities between one another shouldn’t be neglected especially when it involves the relationships between neighbours, friends and others. Thus, it can be understood that a Muslim is permissible to visit a sick non-Muslim. Furthermore, hopefully with the asbab of the visit, his heart will soften to accept Islam just like the incident of the young Jew who embraced Islam at the end of his life. 
Moreover, Syeikhul Islam Ibn Taimiyyah was once asked regarding the ruling of a Muslim visiting his sick Christian neighbour. He answered, it is fine to visit him, for indeed, there is a benefit for the act may soften his heart towards Islam. 
Dr Abd al-Karim al-Khudhair also stated that it is permissible to visit a non-Muslim if it is beneficial for his dakwah and help to soften the heart and open the doors of Islam for him. The reason is the Prophet PBUH himself visited a young Jew who was sick. As the result of his visit, the young Jew embraced Islam after his father instructed him saying: “Obey Abu al-Qasim.” 
According to the above discussion, we concluded that visiting a sick non-Muslim is permissible. Especially, when the visit can be the reason his heart is softened towards Islam and ultimately lead to him embracing this true religion.
The same applies when the sick person is our brother although not of the same religion, he is in terms of our brother in humanity. The value of friendship is crucial and it is a part of a form of dakwah and showcases a great character value.
May Allah SWT grant us all a clear understanding in religion. Amin.
 See Mafatih al-Ghaib, 15/379.
 Narrated by al-Bukhari (5373)
 Narrated by Ibn Majah (1443); al-Tirmizi (2008)
 Narrated by al-Bukhari (1356)
 See Fatawa Mu‘asirah, 2/545.
 See al-Fatawa al-Kubra, 3/5.
 See https://shkhudheir.com/fatawa/342430502.