Wa `alaykum As-Salamu waRahmatullahi 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.
In this fatwa:
1- Muslims believe that no temple, church, or other places of worship can be attacked or destroyed.
2- Muslims condemn such acts of terrorism unconditionally and distance themselves from such groups who use the names of Islam to justify their heinous crimes.
Responding to your question, Sheikh Ahmad Kutty, a Senior Lecturer and an Islamic Scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
Those who perpetrate such horrible crimes are violating the fundamental teachings of Islam which teach the sanctity of life and forbid the desecration of places of worship.
We may do well to remember that while dispatching soldiers to battle, the Prophet (peace be upon him) used to order clear directives that they should not disturb the worshippers or kill civilians or destroy houses or burn down trees, etc.
Furthermore, while explaining the purpose of Jihad or just war, Allah tells us that one of its primary purposes is to preserve and protect all places of worship:
“[They are] those who have been evicted from their homes without right – only because they say, “Our Lord is Allah .” And were it not that Allah checks the people, some by means of others, there would have been demolished monasteries, churches, synagogues, and mosques in which the name of Allah is much mentioned. And Allah will surely support those who support Him. Indeed, Allah is Powerful and Exalted in Might.” (Al-Hajj: 22:40)
Allah Almighty knows best.