Watching 300 again reminded me of how it seems as every single one of those guys were one-liner savages. Was it just for cool factor or there's history around that?
More interesting, though, what's the closest to a primary source we can get on the matter? It would be simply amazing to see thousands year old pieces of material dedicated to ancient roasts.
Were they as witty as the movie portrays them? We'll never know. Were they thought to be as witty as that? Absolutely, and they have been since Classical times. Herodotos already included many pithy Spartan sayings in his history of the Persian Wars; authors like Plutarch, who worked at the time of the emperor Trajan, wrote whole collections of notable sayings attributed to the Spartans, commemorating their reputation for biting wit and economy of words. Many of the one-liners from the movie come straight from those collections.
Here's some examples of lines from the movie with their corresponding ancient source:
LEONIDAS: Earth and water? You'll find plenty of both down there.
'When Darius had previously sent men to Athens and Sparta to demand earth and water, those who made the request were cast at the one city into the Pit and at the other into a well, and told to get their earth and water for the king from there.' (Herodotos 7.133.1)
MESSENGER: What makes this woman think she can speak among men?
QUEEN GORGO: Because only Spartan women give birth to real men.
'Being asked by a woman from Attika, "Why is it that you Spartan women are the only women that lord it over your men," Gorgo said, "Because we are the only women that give birth to men."' (Plutarch, Sayings of Spartan Women 2.5)
QUEEN GORGO: Come back with this shield, or on it.
'Another woman, as she handed her son his shield, exhorted him, saying, "Either with it or on it."' (Plutarch, Sayings of Spartan Women 5.16)
LEONIDAS: You see, old friend? I brought more soldiers than you did.
'Agesilaos ordered all the allies to sit down by themselves, and the Lakedaimonians apart by themselves. Then his herald called upon the potters to stand up first, and after them the smiths, next, the carpenters in their turn, and the builders, and so on through all the handicrafts. In response, almost all the allies rose up, but not a man of the Lakedaimonians; for they were forbidden to learn or practise a manual art. Then Agesilaos said with a laugh: "You see, men, how many more soldiers than you we are sending out." (Plutarch, Life of Agesilaos 26.4-5)
PERSIAN: A thousand nations of the Persian empire will descend upon you. Our arrows will blot out the sun!
STELIOS: Then we will fight in the shade.
'The Spartan Dienekes is said to have exhibited the greatest courage of all. They say that he made the following speech before they joined battle with the Medes: he had learned from a Trachinian that there were so many of the barbarians that when they shot their missiles, the sun was hidden by the multitude of their arrows. He was not at all disturbed by this and made light of the multitude of the Medes, saying that their Trachinian foreigner brought them good news. If the Medes hid the sun, they could fight them in the shade instead of in the sun.' (Herodotos 7.226)
PERSIAN GENERAL: Spartans, lay down your weapons.
LEONIDAS: Persians, come and get them!
'When Xerxes wrote again, "Hand over your arms," Leonidas wrote in reply, "Come and take them."' (Plutarch, Sayings of the Spartans 51.11)
LEONIDAS: You have many slaves, Xerxes, but few warriors.
'Many fell, but others attacked in turn, and they made it clear to everyone, especially to the king himself, that there were many people present, but few men.' (Herodotos 7.210.2)
There are many other ancient sources that collect or cite famous Spartan sayings, and many other parts of 300 where such sayings were cribbed for the script. You'll notice from some of the examples above that sayings attributed to different people, or to unknown people at undefined occasions, were lifted from their context and placed into the version of Thermopylai that the movie presents.
Our natural response to this way of handling the sources is probably indignation: you can't use the sources willy-nilly! You can't cite them out of context and make them fit your preconceived narrative! But this is to misunderstand both the sayings themselves, and the texts in which they are preserved.
On the first point, it's important to bear in mind that there's pretty much no way that any of these sayings are preserved exactly as they were uttered once upon a time. Their purpose is not to flesh out a historical scene or provide the reader with historical facts. Instead, they establish stock characters - the fearless Spartan hoplite, the proud Spartan woman. In the historical texts where these sayings occur, their content is not as important as the fact that they express a fundamental "Spartan-ness" and fulfil the reader's expectations as to how the Spartans would speak. The stereotype was for the ill-educated but extremely self-confident Spartans to say in a few sharp words what others would try to express in lengthy, carefully crafted speeches.
Perhaps the finest example of this is the story of the time when exiles from Samos came to Sparta to ask for help against the tyrant Polykrates. According to Herodotos, the Samians (who were Ionians and thus considered kinsmen of the Athenians) made a long speech outlining their plight and working up to their plea for Spartan aid. The Spartans replied that by the time the speech came to an end, they had forgotten the beginning. The next day, the Samians came back into the Spartan Assembly and tried again. This time, they carried only an empty bag, and said simply, "The bag needs flour". The Spartans replied that they needn't have said 'the bag'. But they promised to help.
The point of the story may be to illustrate how diplomacy with Spartans worked, but it's more likely that it served to highlight the supposed difference between Ionians and Spartans: the former were great orators, but the latter came right to the point. The former developed great proficiency in persuasive speech, which the latter could rarely match; Thucydides said with some admiration of the Spartan general Brasidas, "He was a decent speaker, for a Spartan." But the Spartans had their own down-to-earth way with words. The wit was part and parcel of the stereotype. It showcased Spartan aloofness and indifference to the expectations of others.
The fact that this is all about Spartan stereotypes leads into the second point: where are we getting these sayings from? The first crucial observation is that none of the authors citing Spartan sayings are Spartan. They are outsiders, commenting on a society that they saw as radically different from their own. In everything they write about Sparta, they are driving home the point that Sparta is weird, harsh, brutish, disciplined, unique, powerful, and deserving of its high reputation. Pithy Spartan phrases are a part of this way of writing about Sparta. They confirm the stereotype, highlight the differences, stress the character that Sparta's laws fostered, and express the values that made Sparta great. They are meant to illustrate and teach, not to give facts.
The second crucial observation is that while the practice of collecting things that Spartan men and women supposedly said goes back to the Classical period, most of their surviving sayings come to us through Plutarch. He wrote his works 600 years after Thermopylai and was working with a vast, mixed-up, confusing tradition about Sparta, in which different pasts mingled with a hugely altered present and made a true understanding of Spartan history much less interesting than a collection of awesome one-liners that confirmed an almost unbelievable stereotype. Plutarch is absolutely giving us these sayings in order to say, "look at these Spartans, aren't they awesome? Doesn't their way of speaking express the pinnacle of the good, selfless, courageous, no-nonsense citizen? Isn't their society admirable?"
To drive this point home, Plutarch was not averse to moving quotes around, detaching them from their original context and applying them elsewhere, or connecting loose bits with famous characters. As noted above, Herodotos says it was an otherwise unknown Spartan called Dienekes who said "we shall fight in the shade", but Plutarch (who had certainly read his Herodotos very well) happily attributed the line to Leonidas himself (Sayings of the Spartans 51.6). This is because it wasn't important who actually said the words, or even whether they were said. It was much more important that they expressed this essential "Spartan-ness" that everyone wanted to read about.
Seen in this light, Frank Miller and the writers of 300 stand in a millennia-old tradition. Their way of using generic sayings in and out of their original context in order to sum up what they see as quintessentially Spartan is exactly the way in which Hellenistic and Roman authors handled the received traditions about Sparta. It is making a complete mess of history, for sure, and it is by definition totally uncritical of its source material. But Spartan sayings remain one of the quickest shortcuts to showing what many people have always thought Sparta was like.