Wa `alaykum as-salamu wa rahmatullahi wa barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Dear brother, thank you for your question that shows your interest in knowing more about Islam and to keep stick to its teachings.
There is nothing wrong for a Muslim to enter a church for a permissible reason. It may, even, be recommended in some cases to contact Christians in their churches for building good relations or for any other good reason.
Responding to your question, Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
You are allowed to enter a church if you have a legitimate need to do so; such as attending a funeral or a wedding or in order to acquaint yourself with the Christian way of worship or even developing cordial relations with them. There is nothing objectionable about it in such cases. I would also add that they are not only sanctioned but may even be encouraged in Islam.
In other words, it all depends on the intention and purpose of your visit. If you are entering a Church for the purpose of worship or receiving blessings or confessing your sins or beseeching favors from other than Allah, then you are wrong.
If, on the contrary, it is not for any of the above reasons, and you simply went there to observe how the Christians conduct their services and familiarize yourself with their ways or for the purpose of outreach, dialogue, cooperation in virtuous acts, etc., then there is nothing wrong with that.
In such cases, it may even be highly recommended depending on the nature of your visit and the circumstances. We know that the Caliph `Umar ibn Al-Khattab (may Allah be pleased with him), while in Jerusalem, was taken around in the ancient Church by the patriarch, but he refused to pray inside. When asked about it he said, “I am afraid, if I were to do so, Muslims might later claim it as a prayer place or amusalla.”
To conclude, I can say that there is nothing wrong for Muslims in visiting churches, synagogues, or temples if the purpose is other than worship or religious reasons.
Allah Almighty knows best.
Excerpted with slight modifications from, www.askthescholar.com