The Supreme Court ruled 5 to 4 yesterday that the Constitution's guarantee of a speedy trial does not bar the federal government from prosecuting Indian activist Dennis Banks and three others on 10-year-old firearms charges.

Justice Lewis F. Powell Jr., writing for the majority in U.S. v. Kenneth Moses Loud Hawk, overturned an appeals court ruling that the lengthy delays for pretrial rulings and appeals violated the defendants' rights.

Powell said the prosecution could proceed because the four defendants were not in jail or even under indictment for most of the time. Even when they were under indictment, Powell said, there was no "bad faith or dilatory purpose on the government's part" in appealing some of the trial judge's rulings excluding certain evidence.

The government, Powell said, won those appeals, adding that the defendants, in contrast, wasted time by filing "indisputably frivolous" appeals.

Justice Thurgood Marshall, in dissent with Justice William J. Brennan Jr., Harry A. Blackmun and John Paul Stevens, said the ruling gave "short shrift to the interests protected" by the constitutional right to a speedy trial. Most of the delay, Marshall said, resulted from the appeals court's inability to promptly resolve the appeals.

Marshall said the government, not the defendant, "must suffer the ultimate consequences of delays attributable to overcrowded courts even at the appellate level." Appeals courts, he said, "have no privilege to decline constitutional obligations."

Federal prosecutors, noting the potential problems in trying 10-year-old cases, said yesterday they had not made a decision on whether to try Banks, who is on parole in South Dakota for other charges, or any of the others alleged to have been transporting firearms and 350 pounds of dynamite.

Banks escaped in 1975 when police in Oregon arrested his wife, KaMook; Kenneth Moses Loud Hawk and Russ James Redner. All four were charged with firearms and explosives violations.

Banks finally turned himself in to authorities in 1984 and served part of a three-year sentence for rioting and assault in South Dakota. He was paroled last month.

In two other decisions yesterday, the court ruled that injured prisoners do not have a constitutional right to sue state officials for negligence.

The decisions, written by Justice William H. Rehnquist, narrowed and partially overturned a 1981 decision, also authored by Rehnquist, that might have given prisoners a constitutional right to sue negligent officials in federal courts.

Rehnquist said inmates may sue for negligence under federal or state laws but may not base their claims on constitutional rights.

One case, Daniels v. Williams, involved a Richmond prisoner who suffered back and ankle injuries when he slipped on a pillow left on a stairway by a sheriff's deputy.

Rehnquist, in a 9-to-0 ruling, said the guarantee of due process of law under the Fourteenth Amendment has been "applied to deliberate decisions of government officials to deprive a person of life, liberty or property."

Rehnquist said that "to hold that an injury" caused by leaving a pillow on a stairway, falls within the reach of the Constitution "would trivialize the centuries-old principle of due process of law."

The second case, Davidson v. Cannon, involved a New Jersey state prisoner who sent a note to prison officials saying that he had been threatened by another inmate. The officials took no action. Two days later the inmate, Robert Davidson, was seriously injured in an attack.

In a 6-to-3 ruling, the court said Davidson also could not say he had a constitutional claim to damages. The prison officials' "lack of due care in this case led to serious injuries," Rehnquist said, "but that lack of care simply does not approach the sort of abusive government conduct that the Due Process Clause was designed to prevent."

Justice Harry A. Blackmun, joined by Marshall, sharply dissented. Blackmun said that while he concurred in the Virginia case he would not extend the result to this case.

"It is one thing to hold that a commonplace slip and fall. . . does not rise to the dignified level of a constitutional violation," Blackmun said. "It is a somewhat different thing to say that negligence that permits anticipated inmate violence resulting in injury. . . does not implicate the Constitution's guarantee of due process."

Blackmun said he agreed that "mere negligent activity ordinarily will not amount to an abuse of state power. Where the court today errs, in my view, is in elevating this sensible rule of thumb to the status of inflexible constitutional dogma."

Brennan also dissented from the ruling, which overturns a federal court award of $2,000 in damages to Davidson. Davidson cannot pursue a negligence claim in state courts because New Jersey does not allow inmates injured by other inmates to sue prison officials.

In other action yesterday, the court once again agreed to review a difficult church-state issue involving the extent to which a public employer must accommodate employes' religious needs. The justices said they would decide next term whether the Ansonia, Conn., school board must accommodate a teacher's request for six days off a year for religious holidays.

Ronald Philbrook, who began teaching in Ansonia in 1962, joined the Worldwide Church of God in 1968, which requires adherents to take off the six days. A collective bargaining agreement between the teachers' union and the school board allows three days of paid leave for religious observances.

Philbrook sued, saying that the refusal to pay him for an additional three days violated his rights. A district judge declined Philbrook's request, saying that what he was seeking was not accomodation for his beliefs but preferential treatment.

A federal appeals court last March reversed, saying that the board's policy of limiting paid leave for religious reasons amounted to discrimination on religious grounds. The case is Ansonia Board of Education v. Philbrook.

The court, acting in a case that could affect the rights of millions of public housing tenants, agreed to decide whether tenants of a public housing project in Roanoke, Va., have a right to sue housing officials over alleged violations of federal housing law.

The tenants sued the local housing authority over what they claimed were improper overcharges for electric bills. The tenants said the $113,000 in surcharges they paid over two years violated federal housing regulations.

A federal appeals court ruled that federal law does not allow individual tenants to enforce federal regulations. Those regulations must be enforced by federal housing officials, the court said.

The justices will review Wright v. City of Roanoke Development and Housing Authority next fall.