(Source picture: Wikipedia)
During an ad hoc tribunal of the Holy Roman Empire, the German Peter von Hagenbach was subject to the first international war crimes trial as he was tried for what now is termed command responsibility. His conviction and beheading came after he was found to have committed crimes he had a duty, as a knight, to prevent despite his argument that he was only following orders.
In all likelihood, war crimes have been domestically punished ever since criminal law originated. The Hague Conventions of 1899 and 1907 were international treaties that, along with the First and Second Geneva Conventions (1864 and 1906, comprised some of the first formal statements of the laws governing war and war crimes. Those have been refined and interpreted over time, but the early twentieth century offers three particularly good examples before the advent of the Geneva Conventions of 1949 of how courts were dealing with international legal violations in times of conflict.
After the conclusion of the First World War, Allied leaders developed a concept to try enemy leaders criminally for the international law violations they committed during the war (for more information, see here). Articles 227-230 of the Treaty of Versailles stipulated the arrest and trial of German officials accused as war criminals. These occurred in 1921. The legacy of the Leipzig trial is that it was the first attempt to develop a comprehensive approach and system for prosecuting international law violations in war time.
This particular tribunal convened in May of 1946 to try the leaders of the Empire of Japan for three types of crimes: "Class A" (crimes against peace), "Class B" (war crimes), and "Class C" (crimes against humanity), committed during World War II.
What is known today as the concept of war crime developed further under the umbrella of the Nuremberg Trials based on the definition found in the London Charter (1945). (Also see Nuremberg Principles.) In addition to war crimes, the London Charter also set out definitions for crimes against peace (used today in the discussion surrounding the crime of aggression) and crimes against humanity, often occurring in concert with war crimes during situations of armed conflict.
The Geneva Conventions are four treaties adopted and expounded from 1864 to 1949 (including two Additional Protocols from 1977) that contain the laws governing conduct within armed conflict. They are widely ratified, as are their two Additional Protocols, but even in instances without ratification, much of the Geneva Conventions serve as a primary source of customary international humanitarian law. Breaches of these conventions and their protocols, especially grave breaches, often are justiciable under the auspices of war crimes.
For more about the Geneva Conventions, see the following:
First Geneva Convention "for the Amelioration of the Condition of the Wounded and Sick in Armed Forces in the Field" (first adopted in 1864, last revision in 1949).
Second Geneva Convention "for the Amelioration of the Condition of Wounded, Sick and Shipwrecked Members of Armed Forces at Sea" (first adopted in 1906 and revised in 1949).
Three Additional Protocols were adopted, completing and updating the Geneva Conventions: Protocol I (1977) "relating to the Protection of Victims of International Armed Conflicts", Protocol II (1977) "relating to the Protection of Victims of Non-International Armed Conflicts" and Protocol III (2005) "relating to the Adoption of an Additional Distinctive Emblem".
War crimes committed in internal armed conflict were not recognized in war crimes provisions until the Statute of the International Criminal Tribunal for Rwanda, as a result of the 1994 genocide that occurred there. This post-dates the mandate of the Statute for the International Criminal Tribunal for the Former Yugoslavia, though in the 1995 Tadic case, the Court embraced a broad view of the two categories of war crimes and found that international criminal responsibility included acts committed during internal armed conflict.
The International Criminal Court and the Rome Statute:
In July, 2002, a treaty-based court in The Hague, the Netherlands came into being in order to prosecute war crimes, crimes against humanity, genocide and crimes of aggression committed after July 1, 2002. This Court is able to try citizens of State parties who are accused of committing crimes or those who commit crimes in the territory of a member state. In the Rome Statute, the treaty governing the Court, the drafters embraced war crimes committed in international armed conflicts as well as in non-international armed conflicts.
War crimes are “serious violations of customary or treaty rules belonging to the corpus of international humanitarian law” and can occur in both international and non-international armed conflicts. They have been included into many treaties of several international tribunals, and the International Criminal Court (ICC) classifies them as such:
“War crimes” include grave breaches of the Geneva Conventions and other serious violations of the laws and customs applicable in international armed conflict and in conflicts "not of an international character" listed in the Rome Statute, when they are committed as part of a plan or policy or on a large scale. These prohibited acts include:
-mutilation, cruel treatment and torture;
-taking of hostages;
-intentionally directing attacks against the civilian population;
-intentionally directing attacks against buildings dedicated to religion, education, art, science or charitable purposes, historical monuments or hospitals;
-rape, sexual slavery, forced pregnancy or any other form of sexual violence;
-conscripting or enlisting children under the age of 15 years into armed forces or groups or using them to participate actively in hostilities.
Officially, the Rome Statute of the ICC defines them as, inter alia “serious violations of the laws and customs applicable in international armed conflict” and “serious violations of the laws and customs applicable in an armed conflict not of an international character.” (See Article 8 of the Rome Statute.) The Statutes for the ad hoc tribunals, the International Criminal Tribunal for the Former Yugoslavia, the International Criminal Tribunal for Rwanda, the Special Court for Sierra Leone, the Law Establishing the Extraordinary Chambers in the Courts of Cambodia, and the UNTAET Regulation for East Timor have extended their jurisdiction over “serious” violations of humanitarian law. The inclusion of the word “serious” is not universal. Many states’ military manuals do not contain this word, leaving the definition open to any violation of the laws or customs of war. For example, Australia, Canada, the Netherlands, New Zealand, Nigeria, South Africa, Switzerland, the United Kingdom and the United States, all have military manuals without use of the word “serious” to categorise the level of violation necessary to classify a crime as a war crime. When discussing “grave breaches” of the Geneva Conventions, Article 147 of the Fourth Geneva Convention of 1949 helps understand what is meant here (and what subsequently helped to formulate the particular war crimes enumerated in various treaties mentioned above):
Art. 147. Grave breaches to which the preceding Article relates shall be those involving any of the following acts, if committed against persons or property protected by the present Convention: wilful killing, torture or inhuman treatment, including biological experiments, wilfully causing great suffering or serious injury to body or health, unlawful deportation or transfer or unlawful confinement of a protected person, compelling a protected person to serve in the forces of a hostile Power, or wilfully depriving a protected person of the rights of fair and regular trial prescribed in the present Convention, taking of hostages and extensive destruction and appropriation of property, not justified by military necessity and carried out unlawfully and wantonly.
There have been many examples of war crimes cases. A few of the prominent among this list are cases featured on the International Criminal Database (ICD).
The Rome Statute of the International Criminal Court (.pdf)
 Leslie C. Green, “International Regulation of Armed Conflict,” in M. Cherif Bassiouni, ed., International Criminal Law, 2nd edn., Ardsley, NY: Transnational Publishers, 2003, vol.I, pp. 355-91.
 A. Cassese, International Criminal Law (Second Edition, 2008), at 82.