This image depicts the torso part of a Spartan-hoplite statue which was found in ancient Sparta and identified as a memorial to Leonidas. Image online via Livius.
What we know about Sparta in 480 BCE - a decade after the Battle of Marathon - can best be described in two words: very little. The same can be said of Leonidas, one of the Spartan kings, during that time frame.
Who was Leonidas? According to Paul Cartledge, a Greek-history scholar at Cambridge University:
He was not destined by birth to become king at all, and did so only because his older half-brother Cleomenes I died without male issue. The fact that he was married to Gorgo, Cleomenes's only daughter, making him Cleomenes's son-in-law and indirect heir as well as half-brother, will have eased the succession, presumably. But Leonidas is likely to have felt that he had a lot to live up to, and quite a lot to prove besides. (Cartledge, Thermopylae, page 128.)
Not expecting to be king, Leonidas would have gone through the same education process as other Spartan boys. He would have completed the agoge, would have been flogged at the temple and would have understood his soldiers' warrior attitudes.
Sparta's army did not participate in the Persian rout (at Marathon), the summer of 490 BCE. Focusing on other things, Herodotus (known as the "father of history") picks up the story of Sparta - with extraordinary detail - as the clash with Xerxes (in 480) nears.
How would the Greeks defend against a massive invading force? Where would the first battle take place? Who would lead a coalition of otherwise non-united defenders?
The job of leading fell to Sparta and Leonidas. He would assemble an advance guard of approximately 6,300 men to meet the Persians as they moved further into Greece. Three hundred of those would be Spartans - about four percent of the total Greek army. Only those with a living son, to carry on the Spartan blood-line if a father died in battle, would be chosen.
The first line of defense would be at Thermopylae, an area in central Greece (north of the Gulf of Corinth) where three narrow passes form a gap between mountains and sea. (Today, a road is located where the sea washed ashore in 480.)
Leonidas, like other Spartans, was a religious man. He wanted to know how the gods viewed the coming battle. Herodotus reports the oracle, at Delphi, said that either Greece would fall or a king of Sparta would die. (Some scholars believe the Delphic pronouncement was retrospective, after the event.)
If Leonidas were to die, leading the charge against Xerxes, what better place than at Thermopylae? It was a sacred area where Herakles - from whom Spartan kings are said to descend - also met his end.