Go tell the Spartans, thou who passest by,I describe this as 'the epigram of Simonides', and there are plenty of modern accounts that assert this unproblematically, but it's more accurate to say that it is 'attributed to Simonides'. The problem is that Herodotus, our earliest source for the epigram (7.228), doesn't actually say that it is by Simonides. This is what Herodotus says, in A.R. Godley's Loeb translation (which I use largely for convenience).
That here, obedient to their laws, we lie.
All these, and they that died before any had departed at Leonidas’ bidding, were buried where they fell, and there is an inscription over them, which is this:So, the only text that Herodotus associates with Simonides is the third of these inscriptions. And even there Herodotus only says that Simonides had the text inscribed (using the verb epigraphō). After that, there is then a series of assumptions, set out in J.H. Molyneux' Simonides: A Historical Study (1992), first that if Simonides had an epigram inscribed, he probably wrote it, which seems a fair assumption, and secondly that if Simonides wrote one of the epigrams, he probably wrote the other two, which seems to me to be rather more tenuous.
Four thousand warriors, flower of Pelops’ land,This is the inscription common to all; the Spartans have one for themselves:
Did here against three hundred myriads stand.
Go tell the Spartans, thou that passest by,That is for the Lacedaemonians, and this for the seer:
That here obedient to their words we lie.
Here fought and fell Megistias, hero brave,The inscriptions and the pillars were set there in their honour by the Amphictyons, except the epitaph of the diviner Megistias; that inscription was made for him for friendship’s sake by Simonides son of Leoprepes.
Slain by the Medes, who crossed Spercheius’ wave;
Well knew the seer his doom, but scorned to fly,
And rather chose with Sparta’s king to die.
There are, however, other ancient testimonia. The Greek Anthology (7.248-50) attributes all three epigrams to Simonides. Moreover, Cicero also attributes the text to Simonides (Tusculan Disputations 1.49.101). But I also note that other testimonia for the epigram, Lycurgus, Against Leocrates 109, Strabo, Geography 9.4.16, and Diodorus Siculus, Library of History, 11.33.2, do not mention Simonides' name in connection with it. I wonder if perhaps Cicero and whichever of the many editors of the Greek Anthology first attached Simonides' name also went through the same chain of assumptions mentioned above.
It doesn't mean that Simonides didn't write this epigram; but perhaps we should be more open about the chain of assumptions involved.