Tafsir of verse 42
Al-Mukhtasar
Remember, O believers, when you were on the near side of the valley that was facing Medina, the idolaters were on the far side that was facing Makkah and the caravan was at a spot lower than you facing the Red Sea. If you and the idolaters made an appointment with each other to meet at Badr, neither of you would have kept to it: your lack of numbers as compared to your enemy would have kept you back, and the fear of facing Allah’s Messenger would have kept them back. But Allah, may He be glorified, gathered you at Badr without an appointment, so that He may carry out a matter that was already determined: the victory of the believers and the defeat of the disbelievers – bringing honour to His religion and humiliation to idolatry. This was so that those who died from amongst them would die after evidence was established by the believers’ victory against them, despite their lack of numbers and preparation, and so that those who lived would live with clear evidences that Allah made obvious to them, and no one would have any evidence against Allah that they could use as an argument. Allah hears the statements of everyone and knows their actions. Nothing is hidden from Him and He will repay them for that.
Tafsir of the whole Surah Al-Anfal
Other translations of verse 42
[Remember] when you were on the near side of the valley [of Badr], and they were on the far side, and the caravan was on the lower ground beneath you. If you had made prior arrangements to encounter, you would have failed to keep that appointment. But [it happened] so that Allah might accomplish what had already been decreed, and so that those who chose to perish would perish after seeing clear evidence, and those who chose to survive would survive after seeing clear evidence. Indeed, Allah is All-Hearing, All-Knowing.
(And remember) when you (the Muslim army) were on the near side of the valley, and they on the farther side, and the caravan on the ground lower than you. Even if you had made a mutual appointment to meet, you would certainly have failed in the appointment, but (you met) that Allâh might accomplish a matter already ordained (in His Knowledge), so that those who were to be destroyed (for their rejecting the Faith) might be destroyed after a clear evidence, and those who were to live (i.e. believers) might live after a clear evidence. And surely, Allâh is All-Hearer, All-Knower.
When ye were on the near bank (of the valley) and they were on the yonder bank, and the caravan was below you (on the coast plain). And had ye trysted to meet one another ye surely would have failed to keep the tryst, but (it happened, as it did, without the forethought of either of you) that Allah might conclude a thing that must be done; that he who perished (on that day) might perish by a clear proof (of His Sovereignty) and he who survived might survive by a clear proof (of His Sovereignty). Lo! Allah in truth is Hearer, Knower.
Remember ye were on the hither side of the valley, and they on the farther side, and the caravan on lower ground than ye. Even if ye had made a mutual appointment to meet, ye would certainly have failed in the appointment: But (thus ye met), that Allah might accomplish a matter already enacted; that those who died might die after a clear Sign (had been given), and those who lived might live after a Clear Sign (had been given). And verily Allah is He Who heareth and knoweth (all things).
When you were on the nearer side (of the valley) and they were on the farthest side, while the caravan was in a lower place than you; and if you had mutually made an appointment, you would certainly have broken away from the appointment, but-- in order that Allah might bring about a matter which was to be done, that he who would perish might perish by clear proof, and he who would live might live by clear proof; and most surely Allah is Hearing, Knowing;
As you were on the closer embankment, and they were on the remotest embankment, and the cavalcade (of riders) was below you; and if you had made a mutual appointment, you would indeed have differed about the promised appointment, but that Allah might decree a Command that was to be performed, that whoever perished might perish by a supreme evidence, and whoever lived might live by a supreme evidence; and surely Allah is indeed Ever-Hearing, Ever-Knowing.