It is sternly prohibited to kill someone not involved in war including women, children and elderly. Such killing is not allowed even during the war. Whenever any group went to expedition with intention to participate in Qital or armed warfare, Prophet (PBUH) would especially warn and caution them in this regard;
أخرج أبو داود بسنده عن أنس أن رسول الله كان إذا بعث جيشاً قال: “انطلقوا باسم الله لا تقتلوا شيخاً فانياً ولا طفلاً صغيراً ولا امرأة ولا تغلوا وضموا غنائمكم وأصلحوا وأحسنوا إن الله يحب المحسنين”. (أبو داود.)
وعن البيهقي زيادة: “ولا مريضاً ولا راهباً ولا تقطعوا مثمراً ولا تخربوا عامراً ولا تذبحوا بعيراً ولا بقرة إلا لمأكل”.
Narrated Anas ibn Malik:
The Prophet (PBUH) said: Go in Allah’s name, trusting in Allah, and adhering to the religion of Allah’s Apostle. Do not kill a decrepit old man, or a young infant, or 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.
In Baihaqi, ‘Do not kill a sick, not a monk, not cut down fruitful tree, and desert a habitation, not slaughter a cow or a camel unless it is necessary for provisions.’ {Abu Dawud: 2614}