And why should ye not fight in the cause of Allah and of those who, being weak, are ill-treated (and oppressed)?- Men, women, and children, whose cry is: “Our Lord! Rescue us from this town, whose people are oppressors; and raise for us from thee one who will protect; and raise for us from thee one who will help!”
Those who believe fight in the cause of Allah, and those who reject Faith Fight in the cause of Evil: So fight ye against the friends of Satan: feeble indeed is the cunning of Satan.
According to Study Quran,
“This verse indicates that fighting to relieve the oppressed is a legitimate
basis for religious warfare”
This refers to those wronged, persecuted men, women and children of Makka and of the other tribes in Arabia who had embraced Islam, but were able neither to emigrate nor to protect themselves from the wrongs to which they were subjected. These helpless people suffered many forms of persecution, and prayed for deliverance from oppression.
Ibn ʿAjībah reads this verse as
encouraging all spiritual seekers to strive and fight against the baser human
passions that oppress and weaken the true lights and mysteries of the spirit
within. Like the oppressed of Makkah, these inner lights remain imprisoned in
the carnal soul unless one fights to liberate them from the chains of base desire
and spiritual heedlessness.
Maududi, Abul Ala (2010). Tafhim ul Quran. https://www.englishtafsir.com/Quran/27/index.html
Nasr, Hossein (2015). Study Quran. http://www.islamicweblibrary.com/wp-content/uploads/2020/04/TheStudyQuran.pdf