The Supreme Court, resolving an important constitutional question yesterday, upheld for the first time the right of the government to appeal criminal sentences it considers too lenient.

The justices ruled, 5 to 4, that such appeals do not violate the Constitution's double jeopardy provision, which is designed to prevent defendants from prosecutorial harassment.

The decision upheld provisions of the Organized Crime Control Act, passed in 1970 as part of a crackdown on dangerous criminals. However, its impact is potentially far wider: pending before Congress is a bill that would, among other things, give prosecutors the right to appeal lenient sentences in all federal crimes. That bill, a complete revision of the federal criminal code, has been stalled in part because of debate over the constitutionality of its sentencing section.

The decision also is in line with an overall Burger court trend toward a harder line against criminal defendants.

The case, U.S. vs. DiFrancesco, originated when Eugene DiFrancesco was sentenced by a federal judge in New York state to serve a total of 10 years in prison when he could have received 34 years on charges of arson, racketeering and being a "dangerous special offender" under the crime control law.

Historically, the government's appeal rights in the area of sentences have been unclear and in practice prosecutors rarely challenge sentences they consider too light. But the act specifically allowed such appeals for "dangerous special offenders," so in DiFrancesco's case they did so. He then challenged the provision as unconstitutional double jeopardy.

Justice Harry Blackmun, for the majority, said that the double jeopardy prohibition was primarily designed to protect defendants from the ordeal of successive trials for the same offense and has special force if the defendant has been acquitted once.

But sentencing, he said, does not have the "finality" of an acquittal and and appeal does not produce another trial, just a review by a higher court. "This limited appeal does not involve a retrial or approximate the ordeal of a trial on the basic issue of guilt or innocence," Blackmun wrote. ". . . The defendant is subject to no risk of being harassed and then convicted, although innocent. . . . It is purely a judicial determination and much that goes into it is the result of inquiry that is nonadversarial in nature."

Chief Justice Warren Burger, with Justices Potter Stewart, Lewis Powell and William Rehnquist, joined Blackmun. Justices William Brennan, Byron White, Thurgood Marshall and John Paul Stevens dissented.

"A punishment enhanced by an appellate court is an unconstitutional multiple punishment," Brennan wrote for the dissenters. "To conclude otherwise . . . is to create an exception to basic double jeopardy protection which, if carried to its logical conclusion, might not prevent Congress . . . from authorizing the government to appeal verdicts of acquittal."

The proposed criminal code revision before Congress would set guidelines for maximum and minimum sentencing and permit appeals by prosecutors or defendants if a judge stepped outside the guidelines.

That provision was designed to bring uniformity to sentencing, which now varies dramatically for the same crimes from district to district. Uniformity was one of the main justifications used by the government in arguing the DiFrancesco case before the court as well.

In another victory for law enforcement authorities yesterday, the court also cut back on the legal recourses available to criminal defendants who believe their rights have been violated by policy or prosecutors. The justices ruled, 6 to 3, that a criminal defendant has no right to go into federal court and sue police for damages under civil rights law if his claim of illegal search or seizure has already been resolved in his state criminal trial.

Since the court has also made it more difficult for defendants to win these claims at criminal trials and has already severely restricted other avenues of relief (such as habeas corpus proceedings) through the federal courts, yesterday's ruling was especially adverse to defendants.

The ruling in Allen vs. McCurry stemmed from a suit against police brought by Willie McCurry, convicted in St. Louis in 1976 of possession of heroin and assault on police officers. At his trial, McCurry unsuccessfully sought exclusion of evidence taken by police from his home without a search warrant. He then tried to sue the police for $1 million under civil rights law for violating his rights in the search.

Overruling the 8th U.S. Circuit Court of Appeals, Justice Potter Stewart wrote yesterday that federal civil rights laws were intended to guarantee people rights improperly denied by state courts. But when the state courts do not act improperly, and give a "full and fair hearing" to the claims of a defendant during his trial, there is no reason to allow the same claims to be heard in federal courts.

Issues already decided in one proceeding cannot ordinarily be relitigated in another in any area of law; there is no reason why civil rights laws should be an exception, he said.

Burger, White, Powell, Rehnquist and Stevens joined Stewart.

Blackmun, Brennan and Marshall dissented. The court's decision, Blackmun wrote for the three, "is fundamentally unfair."

Deciding the admissibility of challenged evidence in a trial, they said, is "subsidiary to the purpose of a criminal trial" and the claims may not get as full a review as they would in a civil rights trial, where they would be central.

In addition, the ruling forces defendants to make a "choice between forgoing either a potential defense or a federal forum for hearing his constitutional civil claim."