The Battle of Badr was a small affair, involving maybe around 1250 combatants in total, but seeing as how it was the the first military victory by a Muslim army (of sorts), I suppose you could say it’s pretty important. It was the first of three named battles between Muhammad’s Medinan followers and the Quraysh who’d chased him out of Mecca, a series that, as we know, ended with a Muslim victory and, well, the rest is history.
When I say “Muslim” here, it’s…complicated. The Muslim community hadn’t come close to defining itself in 624. Muhammad was still reciting Quranic verses, so needless to say the other aspects of the faith hadn’t really even begun to take shape. It’s important to understand that his followers at this point were still working out the finer points (and many of the not-so-fine points) of their movement and it hadn’t yet coalesced into a full-on religion. I’m going to refer to Muhammad’s force as “Medinan” from this point on in order to avoid issues around the development of Islam, though “Medinan” is problematic too because not everybody in Medina was on board with Muhammad’s project at this point.
The other thing that’s complicated here is that we don’t have a lot of great sources on the battle. A small battle in a remote desert involving two obscure armies (I’m not even sure the term “army” applies here but let’s go with it anyway) wasn’t exactly going to dominate the Byzantine chronicles for that year, you know? But Badr–along with its sequel, Uhud–do have the advantage of being mentioned in later Quranic passages. If you ascribe to the theory of an early origin for the Quran, as plenty of scholars do and as archeological evidence increasingly seems to corroborate, then those passages are at least enough to assume that the battle really happened and wasn’t made up by later writers.
After Muhammad established himself in Medina, he recited Quran verse 22:39: “Sanction is given unto those who fight because they have been wronged; and God is indeed able to give them victory.” In other words, it was OK for Muhammad’s followers to go to war with the Quraysh. Muhammad resolved to counter the Quraysh by building alliances with the tribes around Mecca and harassing Meccan convoys as they passed by Medina. That harassment led to raids and counter-raids by the Medinans and the Meccans, and Badr is sort of the culmination of this low-level back and forth conflict.
Muhammad and his followers left Medina intending to raid another Meccan caravan, but they stumbled at Badr, a nearby well, onto what was either a very well-guarded caravan or a small army, under the cover of a caravan, sent by the Meccans to put an end to the raiding. Traditional sources call it an army, which you’d expect because it glorifies Muhammad’s victory, but some recent scholarship treats the engagement more as a skirmish between a raiding party and a caravan that was better defended than the raiders were expecting. Muhammad and his followers were probably outnumbered but by how much we’re not really sure because, again, the sources (who go with about a 3-1 Meccan edge, 900-1000 against 300-350 Medinans) want to magnify the glory of the victory and so they probably exaggerate the size of the Meccan force. Whatever the details, on March 13 (give or take–remember, the sources aren’t great here), the two forces met and the Medinans came away victorious. They were able to take some booty, but the larger portion of the Meccan caravan seems to have made a break for it and gotten safely back to Mecca.
Badr looms large in hindsight and in Islamic historiography, but it must also have been fairly important at the time. Had Muhammad and his followers suffered a defeat here, his future in Medinan politics might well have been over before it really got started. As it was, the “battle” (again, of sorts) left him so strengthened that he was able to consolidate his control in his new home and later fight and expel the Banu Qaynuqa, a Jewish tribe in Medina that fell out with Muhammad’s followers shortly after the battle. It was not an auspicious beginning for relations between Muslims and Jews, to be honest.
The Battle of Badr had farther-reaching importance, helping to create the notion of jihad as Holy War and of martyrdom as a central element of the developing Islamic faith. It also, as I said above, was later mentioned in the Quran, for example in verse 3:123 in the context of discussing the later Battle of Uhud (which Muhammad and his followers lost though the outcome was indecisive): “Already God had given you victory at Badr when you were contemptible [in the sense of pitiable, ragged]. So fear God, that you may be grateful.”