From the prophet Muhammad:
"Set out for Jihad in the name of Allah and for the sake of Allah. Do not lay hands on the old verging on death, on women, children and babes. Do not steal anything from the booty and collect together all that falls to your lot in the battlefield and do good, for Allah loves the virtuous and the pious."
"Stop, O people, that I may give you ten rules for your guidance in the battlefield. Do not commit treachery or deviate from the right path. You must not mutilate dead bodies. Neither kill a child, nor a woman. nor an aged man. Bring no harm to the trees, nor burn them with fire, especially those which are fruitful. Slay not any of the enemy's flock. save for your food. You are likely to pass by people who have devoted their lives to monastic services; leave them alone"
PROHIBITION OF KILLING WOMEN AND CHILDREN IN WAR
Book 019, Number 4319 Sahih Muslim:
It is narrated on the authority of 'Abdullah that a woman was found killed in one of the battles fought by the Messenger of Allah (may peace be upon him). He disapproved of the killing of women and children.
Book 019, Number 4320:
It is narrated by Ibn 'Umar that a woman was found killed in one of these battles; so the Messenger of Allah (may peace be upon him) forbade the killing of women and children.
and in the Quran:
Because of that, We decreed upon the Children of Israel that whoever kills a soul unless for a soul or for corruption [done] in the land - it is as if he had slain mankind entirely. And whoever saves one - it is as if he had saved mankind entirely. [5:32]