Plato was born in Athens around 427 B.C. His aristocratic family background led him into a messy career in politics, which netted him a number of close calls and a permanent disillusionment with governmental pursuits. The death of his teacher Socrates (469–399 B.C.), was a catalyst for Plato, who embarked on a philosophical mission that blossomed into the founding of the Academy in about 387 B.C. The Academy was a great success (and an important point of origin for Western education); among Plato's pupils was Aristotle. Most of Plato's early work went toward a recreation, through dialogues, of the thinking of Socrates (who never wrote anything down), and much of Plato's later work built on that thinking. Thus, little is known about Socrates himself besides what is described by Plato, and much of that is blended with Plato's own ideas, motives, and recollections. Most accounts suggest that Socrates was an honored soldier in the Peloponnesian War, who spent much of the rest of his life wandering around Athens engaging in philosophical debates on the street. In the Charmides, these two aspects of Socrates' life meet: he returns from the army and a vicious battle and goes straight to greet and debate with friends in one of Athens's public spaces. Despite his military bravery (and largely because of his presence in public spaces), Socrates was put on trial and executed for being a religious subversive and for corrupting the youth of Athens—a charge that resonates strongly and poignantly in dialogues like the Charmides and the Lysis, in which Socrates is simultaneously debating with, educating, and seducing young men or boys. Socrates's speech at his trial and his conversation before death are re-enacted in Plato's Apology and Crito, respectively. The general consensus is that there was probably a political motive involved in his execution as well.
There isn't a great deal of historical context necessary to the understanding of the Charmides, except perhaps a passing grasp of how relationships between men and boys often functioned in Athenian life at the time. The important point here is that the love of adult men for young men occupied a very accepted place in Athenian society. Ideally, the older man was to pursue the younger man, seduce him, and 'impregnate' him with wisdom; thus, the relationship covered everything from incapacitating lust (which Socrates feels at the beginning of the Charmides) to the noble appreciation of beautiful forms. The younger man was supposed to be modest, resisting lovers' advances.
With regard to other aspects of Greek culture as they relate to the dialogues, it is sometimes helpful to recall that the Athens in which Plato wrote the Socratic dialogues was not a static, ideal state; Plato was writing about philosophical ideals, but his specific concerns and examples are often shaped by an awareness of the national and international power struggles that helped shape Athenian society. The same can be said of Socrates, whose major targets (according to Plato) often included the inflated traditional ideals of the ruling aristocracy. The Greek code of virtue and honor, based strongly in oral history (poetry) and religion, was generally seen as self-evident; it had certainly never been subjected to the kind of relentless analysis that Socrates developed. Both Socrates and Plato criticized and re-invented Athenian systems of value, and both ran into real-world trouble with the judicial and governmental structures in which those values were embodied (Plato in his early career in politics, Socrates at the end of his life). It is notable in this regard that Socrates, at one point in the Charmides, imagines an ideal state governed by wisdom and dismisses it as almost inconceivably optimistic (later, in the Republic, Plato will have Socrates explicate the possibility seriously and at length).
The Charmides is probably one of Plato's earlier dialogues, judging by its relative dependence on the Socratic elenchus and its ending in aporia (the state of inconclusive non-knowledge). As Plato's series of dialogues develops, there is a clear shift in content away from the Socratic method and towards a more complex philosophical system that can only be Plato's own. Although the Charmides seems quite Socratic in its refusal to assert anything in the end, it is still a text in which the voices of Socrates and Plato are bound together, the former as character and narrator and the latter as author. The Charmides is also, along with the Lysis, one of the least studied of Plato's dialogues (though all of them have, of course, been studied quite a bit). This is primarily because the dialogue involves a fair amount of inconsistent or even muddled argumentation, but the critical inattention may also be due in part to the strange mix of lustiness, tall-tales, and trickery that open and close the dialogue. The dialogue proceeds, like many others, through a number of rejected hypotheses, and retains few clear assertions by the end. Nonetheless, a few intriguing philosophical propositions are raised in a particularly dense and concise—one might almost say poetic—fashion. Of particular note here is the profoundly difficult notion of self-knowledge as a knowledge both of knowledge itself and of the absence of knowledge, and its corresponding notion that self-definition might somehow be relational.