Military justice, the old joke goes, is to real justice as the crash and oompah of martial music is to Beethoven or Mozart. That may have been true during the days of keel-hauling and battlefield firing squads, but there is no doubt that today's GI is much more apt to get a fair shake when accused of wrongdoing.
And while there still are clear differences between civilian and military legal systems, these differences are likely to be narrowed by recent trends at the Pentagon, on Capitol Hill, and in military courts themselves.
* Reform legislation is moving quickly through Congress, a measure that everybody from the armed services to the American Civil Liberties Union says is needed to improve the administration of justice in the military. Under this bill , defendants in the armed forces will have, for the first time, the right to appeal their cases directly to the US Supreme Court. Also for the first time, the standing committee that reviews and proposes modifications to the Uniformed Code of Military Justice (which details offenses and penalties) is to include civilians.
* Another proposed bill would give those in uniform personal legal assistance in civil matters, such as wills and divorces, which are outside of direct military concern.
* For the first time in 14 years, the Manual for Courts-Martial (which details how prosecutions against those in uniform are to be conducted) is undergoing comprehensive review. Revisions will be presented to President Reagan for approval within the next two months. Those familiar with the review say it will bring the administration of military justice more in line with civilian law. Civil libertarians are particularly pleased that, for the first time, this review also has included a period for public comment by bar associations and other nonmilitary legal experts. Mr. Reagan already has directed that most of the rules of evidence in federal cases applying to civilians be applied to the military as well.
* Last month, the US Court of Military Appeals declared that the military services' capital punishment law is unconstitutional. The highest military court ruled that military prosecutors had improperly failed to consider aggravating circumstances when distinguishing between serious crimes (in this case murder) that require the death penalty and those that might result in lesser punishment.
''The degree of ferment within the system of military justice is greater now than at any time since the Vietnam war,'' declares Eugene R. Fidell, a former US Coast Guard lawyer who is now a volunteer attorney for the American Civil Liberties Union and represents armed forces personnel.
Civilian review of the Manual for Courts-Martial is ''symbolically and philosophically a development of the first importance,'' he says. Looking at recent actions by the Pentagon and the Reagan administration in this area, he adds: ''They're clearly moving in the right direction.''
In congressional testimony recently, Chief Judge Robinson Everett of the US Court of Military Appeals said US Supreme Court review of military cases ''would represent a historic change.'' This expected legislative change will give federal prosecutors as well as uniformed defendants the right to appeal military cases to the highest US court.
One of the remaining important differences between civilian and military court cases is in jury selection. In court-martial cases, uniformed jurors are selected by the defendant's commander (who also determines punishment). Usually, the jurors are officers and senior enlisted personnel, and critics say this typically does not ensure a jury of one's peers. In a recent case at Quantico, Va., a black marine corporal was convicted of kidnap and rape by a jury of seven officers, only one of whom was black.
''To the extent he wants, (the commander) may pick people he knows have a disposition toward conviction,'' said Steven Honigman, a former US Navy lawyer who now chairs the New York City Bar Association's committee on military affairs.
''We think the idea of random jury selection is very, very important,'' he said. ''In our view, it is unreasonable to presuppose that lower-ranking enlisted members of courts-martial will condone lawlessness or prove reluctant to impose an appropriate punishment.''
Some military commanders are said to be experimenting with random selection of courts-martial jurors. And to the extent that the legislative and executive changes are put into place, most observers feel that the stature of military law will be raised.