Overall meaning :
Allah Almighty reminds His Prophet Muhammad, may Allah bless him and grant him peace, of the time when he set out from his home to station the believers at their right battle positions in preparation for confronting the unbelievers at the Battle of Uhud, stating that He is All-Hearing, All-Knowing.
He also reminds him about the time when two groups from among the believers—the Banu Salamah and the Banu Al-Harith clans—were on the point of losing heart, but He gave them courage and helped them stand firm, pointing out that in Him alone should the believers put their trust.
The Almighty then reminds the believers of the victory He graciously granted them at the Battle of Badr when they were helplessly few in number and under-equipped, noting that they should be mindful of Him so that they may be grateful to Him for the favour He has graciously bestowed on them. Then He reminds His Prophet, may Allah bless him and grant him peace, of the time when He instructed him to give his companions good news on the day the Battle of Badr took place: Is it not enough for you that your Lord will reinforce you with three thousand angels, whom He will send down to fight on your side?’ Yes, it is. Besides, if you remain patient and are mindful of Allah by doing what He commands and avoid what He forbids and the idolaters come rushing at you immediately from the same place again, your Lord will reinforce you with five thousand angels well marked for their gallantry.
Allah ordained this to be said by His Messenger, He further states, only as good news for them and to put their hearts at rest thereby; for victory comes only from Allah, the All-Mighty, the All-Wise. He grants them victory to destroy some of the unbelievers or disgrace some others so that they withdraw utterly defeated and return home without their attaining any good. Or He may guide them to embrace Islam or punish them for their wrongdoing, for all power of decision regarding them rests with Allah, not to the Prophet, may Allah bless him and grant him peace.
Almighty Allah then declares that to Him alone belongs all that is in the heavens and the earth. He forgives whomever He wills of His servants and punishes whomever He wills of them, and He is the All-Forgiving, the All-Merciful.