The Messenger of Allah, peace and blessings of Allah be upon him, enacted a law for war in the battlefield.
Narrated Anas Ibn Malik (may Allah be pleased with him): The Prophet (peace be upon him) said: Go in Allah's name, trusting in Allah, and adhering to the religion of Allah's Messenger. Do not kill a decrepit old man, a young infant, a child, or a woman. Do not be dishonest about booty, but collect your spoils. Do right and act well, for Allah loves those who do well. (Sunan Abu Dawud 2614)
The Muslim combatant is committed to preserve souls and money of the weak, the innocent, the unarmed, the non-combatant and is warned against destroying civilizations and infrastructure of the place they are fighting in. Muslims do not demolish lands of the combatants of the other army, or burn their harvest, or slaughter their animals without a necessity.