Plato's dialogues were written during the fourth century BC, and set during the lifetime of Socrates, who had died in 399BC. Socrates' suicide after his condemnation to death by the Athenian polis led many of his followers to write about him. Along with works of Xenophon such as the Memorabilia and the Apology, the dialogues of Plato are the only extant examples of this genre.
The dialogues are literary masterpieces which have shaped philosophical debate for centuries, and historical accuracy is unlikely to have been a primary consideration, although some level of versimilitude may have contributed to their effect on Plato's contemporaries. Still less is any dramatic date an indication of the date of writing. Plato's Apology, focusing on the end of Socrates life, likely to have been among his earliest writings, with others focusing on the same period, like the Phaedo, written much later.
What follows is an attempt to order the dialogues in terms of their dramatic date, following the chronology in Debra Nails' Socrates article at the Stanford Encyclopedia of Philosophy, and supplementing with internal evidence from the small number of dialogues which Nails does not explicitly mention. Most of the dates below are taken from Nails, to which students of the peer-reviewed literature should refer in the first instance.
The Parmenides c.450 BC - This is marked as an early dialogue by the presence of Parmenides himself, a presocratic philospher of the late Sixth and early Fifth centuries BC. At the opening of the dialogue, the character Cephalus narrates:
[127b] that Zeno and Parmenides once came to the Great Panathenaea; that Parmenides was already quite elderly, about sixty-five years old, very white-haired, and of handsome and noble countenance; Zeno was at that time about forty years of age; he was tall and good-looking, and there was a story that Parmenides had been in love with him.
[127c] He said that they lodged with Pythodorus outside of the wall, in Cerameicus, and that Socrates and many others with him went there because they wanted to hear Zeno's writings, which had been brought to Athens for the first time by them. Socrates was then very young. So Zeno himself read aloud to them, and Parmenides was not in the house.
Nails' date of 450 BC puts the the dialogue midway between Parmenides' birth in the late Sixth Century and Socrates' death in 399 BC.
The Protagoras c.433-432 BC. As with the Parmenides, the presence of the sophist Protagoras, thought to have died in around 420BC helps to date the dialogue, in which he is said to be a generation older [317c] than Socrates and the other speakers. The description of Alcibiades [309a] as a youth in the first flush of manhood suggests a date in the 430s.
The Republic c.431-404 BC. In an article in the Classical Journal, Nails argues that the internal evidence for the dramatic date of the Republic is inconsistent, and may reflect several revisions. Among the key points of internal evidence that have to be accounted for are the fact that the dialogue took place during a peaceful summer [Rep I 350d], the recent inauguration of a festival in honour of the goddess Bendis [327A, 354A], and a recent battle in the vicinity of Megara [368A]. The two dates most often proposed are circa 421BC, during the interruption of the Peloponnesian War by the Peace of Nicias, and circa 411 BC, during the turbulent aristocratic regimes of the Four Hundred and the Five Thousand.
The Gorgias c.431-404 BC. Like The Republic, The Gorgias takes place at some point during the Peloponessian War, but contains contradictory evidence as to the relevant period of the conflict. A reference [473e] to Socrates serving as a member of the council during the presidency of his tribe the previous year, has been taken to suggest a date of 404 BC. However, a mention later in the dialogue [503c], of the recent death of Pericles would appear to place it closer to 427 BC.
Charmides c.429 BC. This dialogue's setting during the Peloponnessian War is marked by its opening [153a] with Socrates' return from the Athenian army at Potidea, focus of a key campaign in northern Greece during the early part of the conflict.
Laches c.424 BC. This work is set in the aftermath of the Athenian defeat at Delium in 424 BC where Laches, the title character, was the general in command. in the course of the dialogue, Laches praises Socrates' conduct during the fighting [181b].
Cratylus c.422 BC. Nails dates this work to the aftermath of another Athenian defeat, at Amphipolis. This would be around the time of the death of Hipponicus, father of Socrates' interlocutors Callias and Hermogenes. However, others argue that the crucial passage [391c] could place events some time after Hipponicus' death.
Phaedrus c.418-416 It is strongly debated whether there is any viable dramatic date for this dialogue. A setting before the exile of the historical Phaedrus in 415 BC would seem most likely.
Symposium c.416 BC. This dialogue portrays a celebration at the home of the tragedian Agathon to mark his success in a dramatic competition [175e], and is thought to reflect a historically attested victory in 416 BC.
Lysis c.409. Nails infers a date before the Euthydemus from the ages of Socrates' young interlocutors, although Catherine Zuckert argues this order should be reversed.
Meno c.402 BC. The dating of the Meno is thought to be relatively well understood compared to other dialogues. One factor is that it must have been set prior to Meno's death in the Persian expedition recorded by Xenophon.
Menexenus c.401 BC. One indication of the setting of this dialogue may be the reference to a raid by the forces of the restored Athenian democracy on the remnants of the Thirty Tyrants at Eleusis [244a].
Theatetus 399 BC. This work begins the sequence of dialogues dated straightforwardly around the events leading up to Socrates' death in 399 BC [142c]. It ends with Socrates leaving to answer the prosecution brought against him by Meletus [210d].
The Apology 399 BC. Plato's account of Socrates' trial, also the subject of an work by Xenophon.
Crito 399 BC. Set during Socrates' imprisonment prior to his death.
Phaedo 399 BC. Plato's dialogue on the soul gives his account of Socrates' death.