Were they the same warrior culture during the Trojan War that they were during the Peloponnesian War and at Thermopylae?
Great question, and one that is rather difficult to answer and subject to quite a bit of debate. The problem, which your question gets at, is that Spartan culture tends to be presented as something static, even in ancient sources. Essentially they narrate that Sparta entered into a period of stasis (more in a second), then Lycurgus comes along in the eighth century, he creates the militarized, timarchic society which was then carried on in perpetuity. But of course this is probably not what happened, best seen by the fact that even in our sources we have we can seen changes in Spartan society. One example would be the infamous crypteia, when young Spartan men stalked the countryside terrorizing the helots. This only appears very late in the classical period (its most notable description is from the Roman era Plutarch but it was briefly described by an old Plato in Laws), and was probably a new institution specifically for the brutal low intensity warfare around Messenia after the Battle of Leuctra.
Anyway, the earliest appearance of Sparta is, as you say, in Homer but this is not particularly good historical data, except for telling us that Sparta was well known in Homer's day. There was, however, a Mycenean settlement there. Anyway, Bronze Age Collapse occurs in history, corresponding to the mythological end of the age of heroes, followed by the so-called "dark Ages". Like all Greek cities, it emerges from this period into history in the state of stasis or civil strife. At least from out Atheno-centric viewpoint, most Greek cities explained their political institutions as the neccesary set of laws created to end stasis. In Athens this was the lawgiver Solon, followed by the tyranny of the Peisistratids, who laid the groundwork for the development of democracy. In Sparta by contrast the period of stasis was ended by the lawgiver Lycurgus, who gave strong, virtuous and militaristic laws. From a historical perspective these stories probably do contain a great deal of truth. The Archaic appears to have been a fairly unstable period of Greek history, particularly in terms of class conflict between the impoverished ordinary people and the increasingly wealthy and distant elite. This left large groups who were available to be used in increasingly violent feuds between the elite. In Sparta the solution seems to have been the transformation of the elite into a closed and highly tight knit society, in which they all viewed themselves as equals (homoioi). The militarism of Sparta during the classical period probably reflects this circumstance.
Paul Cartledge is one of the leading authorities on Spartan society, his Sparta and Lakonia is an ambitious attempt to separate myth from history.
The Spartans were always a militant culture, with the Dorians settling Sparta and Laconia around 1000 BC. Since their inception, they conquered the people around them in Messenia and Laconia, taking them as slaves to support their people, and their militant life style, as they had no other way of gathering food, because men were required to serve in the military.
As far as the agoge (the more traditionally thought of Spartan training program, and what I think you meant by becoming the warrior culture portrayed in pop-culture) goes, it probably began around the 7th century BC, or perhaps even as early as the 8th century BC, with its founding being attributed to the figure of Lycurgus, who is usually considered a figure of mythology by scholars, though some disagree and consider him a real man (including the Ancient Greek historian/biographer Plutarch).
Source:
Cartledge, Paul
2004 The Spartans. Vintage Books, New York.
As portrayed in pop culture today
ಠ_ಠ
Uh... never?
Edit: I guess I should add something to try and stave off the wrath of our mods.
Pop culture portrayal of Spartans (in e.g., 300) is ridiculous and inaccurate. In large part because of completely inaccurate & unrealistic modern day pop culture memes, conventions, & stereotypes about wars, combat, what makes for the most effective warriors, etc.
Rather than 7 feet tall beefcakes strutting about acting all macho, we're probably dealing with quiet, reserved people, rather smaller/runtish than the norm. See e.g. their famously unappetizing diet, & their practice of feeding their older children inadequately in the agoge. Man for man they were probably not superior to the Persian upper classes (who after all, also made it their full time pursuit to train & practice the warlike arts, or the very closely related, like hunting on horseback) who filled the ranks of the Immortals.
But the true measure of an army is in its cohesion and discipline. It's really their superiority in this, and their far greater standards of drilling, that would have set the Spartans apart from their contemporaries.