Overall meaning :
People asked the Messenger of Allah, may Allah bless him and grant him peace, about the reason for the phases and changing conditions and sizes of the moon, so Allah Almighty informed him of the answer to communicate to them in reply to their question: Allah has made such phases as signs for people to regulate and mark fixed periods of time in their affairs, such as the time to start and end the fast, the time a debt falls due, the time signalling the beginning of pilgrimage, and the time for women to observe the ‘iddah, or waiting period, in consequence of a dissolution of marriage, either by divorce or the death of her husband, among other matters.
Before the advent of Islam, pilgrims not from the Quraysh tribe who assumed the consecration state (ihram) for pilgrimage would habitually refrain from entering their houses from their back doors. Allah teaches them that there is no virtue in doing so, and that true virtue and righteousness lies in being mindful of Him—by observing His orders and shunning what He has prohibited—and commands them to enter their house from their usual front doors and to observe piety. By obeying Allah’s commands and eschewing what He has forbidden, they will surely attain what they seek and be saved from what they fear and attempt to avoid.
Then Allah directs the believers to fight in His cause only the unbelievers who fight them and not to kill women, children, the elderly and non-combatants, who do not take part in fighting them. They would be transgressing the limits if they do, He asserts, for He does not like those who violate the limits He has set.
He further directs them to fight the unbelievers who fight them wherever they find them and expel them from the places from which the unbelievers have expelled them before, stating that the unbelievers’ worshipping false gods besides Allah is far worse than slaying them, just as their attempt to compel the believers to abandon their religion and become unbelievers like them is far worse than killing the believers while holding on to their faith.
He also forbids the believers from initiating fighting against the unbelievers within the precincts of the Sacred Mosque; however, if the unbelievers initiate fighting there, then the believers should kill them, as punishment for all the unbelieving aggressors. If they then repent, convert to Islam and leave fighting, Allah will surely pardon their sins and, by His grace, lead inspire them to do good so that He will reward them for it.
Allah reiterates His order to the faithful to continue fighting against the idolaters who worship idols besides Allah until the practice of worshipping others besides Allah comes to an end and Allah alone is worshipped. If, however, these Arab idolaters desist from fighting and turn to Allah in repentance, then they should not be fought anymore, for punishment falls only on those who wrong themselves through unbelief, worshipping others besides Allah or engaging in fighting. As for these, they have now absolved themselves of such injustice through repentance.
Then Allah makes it clear to His believing servants that if the idolaters fight them during one of sacred months, they should likewise fight them in it. Just as they have violated the sanctity of a scared month, the believers may also violate the sanctity of the month, which is only a fair punishment. If anyone transgresses against the believers, they are allowed to return their aggression in kind but without transgressing the limit of equal and fair retaliation He has set for them, and must be certain that Allah is with those who fear Him by obeying His commands and eschewing what He has prohibited.
Allah then urges the believers to spend their wealth with a view to seeking His closeness, such as by spending it to fight against the enemies of religion to make the religion reign supreme. He warns them against doing things which could bring their ruin and ultimate punishment, by disobeying divine commands or engaging in what He has forbidden. This includes abstaining from spending freely for His cause, directing them at the same time to persevere in doing good under all circumstances, whether dealing with their Creator or with others like them, because He loves those who do good.