When the battle of Uhud came to pass the Prophet sallAllahu aalyhi wa sallam, in keeping with the promised date set by the disbelievers, started preparations to confront them at Badr in the month of Dhi-Qa’dah. At that time, some people betrayed a little hesitation in going along because of having been recently wounded, while some others did so because of rumors.
Thereupon, Allah subhanahu wa ta’ala revealed this ayah where guidance has been given to the Prophet sallAllahu aalyhi wa sallam that he should ignore the infirm and the scared among Muslims and show no hesitation in marching on to Jihad even if has to be all alone, for Allah is his Helper. With this guidance on hand, he went ahead to Badr with seventy Companions as promised to Abu Sufyan after the battle of Uhud. There it so happened that Allah subhanahu wa ta’ala put awe and fear in the hearts of Abu Sufyan and his disbelieving accomplices from the tribe of Quraysh.
Not one of them showed up for the fight as a result of which they turned out to be false in their solemn promise. Thus, as the text says, Allah subhanahu wa ta’ala prevented the mischief of the disbelievers and the Prophet sallAllahu aalyhi wa sallam returned back with his companions safely. [Qurtubi & Mazhari]