War can be declared in cases of self defense, as the Quran said,
"Fight in the cause of God, those who fight you, but do not transgress the limits; for God loves not the transgressors" [2:190].
Equally, with reference to the words,
"Those who have been wronged are permitted to fight" [22:39],
It may be invoked to combat oppression and anarchy. A war can only be declared after certain criteria have been met: the war must have a noble cause; all peaceful means to resolve a conflict must have been exhausted; and the war must be the lesser of the two evils.
There is a strict protocol for the conduct of war in Islam. Under Islamic law, non-combatants are protected. Unnecessary harm to the environment is prohibited. The standing order for the army at war is "do not harm an innocent non-combatant, do not harm children, women, old people or priests/rabbis. Do not burn, cut for flood a tree nor kill an animal unless for food." [Musnad Ahmad, Marasil Abu Dawud]
Thus the development and use of weapons intended to cause non-discriminate damage and carnage--so called weapons of mass destruction - would be problematic from an Islamic point of view. Lastly it is incumbent on Muslims to come to peace if the enemy chooses to incline to peace at any time after the inception of hostilities, as the Quran has said, "And if the enemy incline towards peace, you als incline to peace and trust in God" [8:62].