Praise be to Allah.
There is nothing wrong with renting a house to a non-Muslim for him to live in, but it is haraam to rent it to anyone who is going to use it for sinful purposes such as if he is going to use it as a house of worship or a venue for sinful activities and so on.
It is preferable to rent it to a Muslim.
As-Sarkhasi (may Allah have mercy on him) said:
There is nothing wrong with a Muslim renting out a house to a dhimmi (non-Muslim living under Muslim rule), and if the latter drinks wine in it, or worships the cross in it, or brings pork into it, there is no sin on the Muslim for any of that, because he did not rent out the house for that purpose. The sin is the action of the renter and there is no sin on the landlord for that.
End quote from al-Mabsoot, 16/39
It says in al-Mawsoo‘ah al-Fiqhiyyah, 1/286:
If a dhimmi rents a house from a Muslim on the basis that he is going to use it as a church or a place to sell alcohol, the majority of scholars (Maalikis, Shaafa‘is, Hanbalis and the companions of Abu Haneefah) are of the view that the rental contract is invalid, because it is based on sin. But if the dhimmi rents a house to live in it for example, then he turns it into a church or a place of worship, then the rental contract remains valid, without any difference of scholarly opinion. And the landlord, and Muslims in general, should try to stop that on the basis of enjoining what is good and forbidding what is evil, as they should also try to prevent such things in a house that belongs to a dhimmi. End quote.
It was narrated from Imam Ahmad (may Allah have mercy on him) that this is makrooh, and he was very strict with regard to selling.
Al-Mirdaawi (may Allah have mercy on him) said: al-Marwadhi narrated (from Ahmad, that he said): The property of a Muslim should not be sold (to a non-Muslim) to turn it into a place of worship in which bells are rung and crosses are set up. He regarded that as a serious matter and was strict on this point. Abu’l-Haarith said: I do not think this is right; selling it to a Muslim is preferable. Al-Khallaal said: In my opinion he should not sell it to him or rent it to him, because it is all the same. Abu Bakr ‘Abd al-‘Azeez said: There is no difference between selling and renting; if selling is not allowed then renting is not allowed. Our shaykh – i.e., Shaykh Taqiy ad-Deen – said: al-Qaadi and his companions agreed with him on this point.
End quote from Tas-heeh al-Furoo‘, 2/447
Al-Mardaawi regarded as correct the view that it is permissible but makrooh.
To sum up: it is permissible to rent the house to a non-Muslim for him to live in it, but renting it to a Muslim is preferable.
And Allah knows best.