There is no explicit evidence from the Qur’an or the authentic hadith of the Prophet (p) prohibiting Muslims from entering any place of worship such as churches, synagogues and temples for benign and legitimate reasons. On the contrary, some of the Companions of the Prophet (p) such as Ali bin Abi Talib, Mu’awiya bin Abu Sufyan, and others entered churches when they were invited to visit and also for meals. (Ibn Qudamah, Al-Mughni, Dar al-Fikr, Beirut, 1405AH, vol.8, p.113). Some of them even prayed (salat) in such places. Ibn Hajar al-Asqalani, Fath al-Bari, Dar al-Fikr, Beirut, vol.1, p.531
In a narration “When Umar came to Syria, the Christians made food for him and called him, and he said: “Where is it?” They said: “In the church”, and he refused to go. He said to Ali: “Take the people to eat lunch.” So Ali took the people and entered the church, and he and the people ate lunch, and Ali looked at the images and said: “What would be wrong if the Amir al-Mu’minin (Umar bin al-Khattab) entered this place?” Al-Mughni, vol.8, p.113, al-Maktabah al-Shamilah 3.13
It is also reported that on some occasions, Umar bin Khattab agreed to the expansion of the churches and monasteries of the People of Covenant (Ahl al-Dhimmah) on the conditions that they would allow Muslims to spend nights therein (if need be) Ibn Qudamah, Al-Mughni, Dar al-Fikr, Beirut, 1405AH, vol.8, p.113
The great Hanbali scholar Ibn Qudamah, in his book Al-Mughni, discusses in detail the various positions of scholars on this topic, and concludes that it is permissible to enter churches even if there are statues in it as did some of the Companions of the Prophet (p) Ibn Qudamah, Al-Mughni, Dar al-Fikr, Beirut, 1405AH, vol.8, p.113
Thus, Islam does not prohibit a Muslim from entering such places of worship for any positive or beneficial reason. There is no prohibition in Muslims from attending weddings, or witnessing funerals, or any other permissible social function in Churches, etc. Naturally, this should be with the permission of the relevant authorities.