The Supreme Court ruled 6 to 3 yesterday that western Indian tribes can sue the government for millions of dollars in damages for allegedly mismanaging valuable timber lands on their reservations.

The ruling was a major victory for the tribes, which have claimed over $100 million from the government on the grounds that it wasted the forests, which might have produced substantial income for tribe members.

The case was brought by members of the Quinault Tribe on the Olympic Peninsula in Washington. Much of the timberland there has been stripped, leaving vast barren patches in the once heavily forested area.

Members of the tribe sued the government in 1971, contending that it breached its responsibility to manage the land properly in the interest of the Indians. The Indians charged, among other things, that the government allowed the sale of timber at below-market rates, failed to develop nearby roads for timber development and failed to guarantee continued tree growth through proper reforestation methods.

The federal government ordinarily may not be sued unless it waives its "sovereign immunity" by statute. Federal officials argued in yesterday's case, U.S. vs. Mitchell, that it has never done so.

Justice Thurgood Marshall, writing for the court, disagreed. He said a law called the Tucker Act allows some suits to redress grievances against the government. It is bolstered by a series of other laws, enacted over the past century, that "give the federal government full responsibility to manage Indian resources and land for the benefit of the Indians," Marshall said.

The combination, he said, implies a right to sue.

"It would be anomalous to conclude that these enactments create a right to the value of certain resources when the secretary of Interior lives up to his duties, but no right to the value of the resources if the secretary's duties are not performed," Marshall said.

Justice Lewis F. Powell Jr., joined by Justices William H. Rehnquist and Sandra Day O'Connor, dissented, saying a right to sue the government must be "unequivocally expressed," not just "implied" by federal law.

It was the second time the court considered the suit. In 1980, the justices denied the tribe the chance to sue under a different law. The case now goes to the U.S. Court of Appeals for the Federal Circuit.

In other action yesterday:

* The justices said fathers of illegimate children may have a right to retain their legal status as fathers as long as they behave like fathers.

The case stemmed from the efforts of a New York man to block an adoption proceeding which, without notice to him, terminated his relationship with his daughter born illegitimately two years earlier. The man had established no relationship with the child, had never provided support to the child and had never offered to marry the mother, the court said.

Meanwhile, the mother married and sought the adoption order to make her husband the legal father.

Justice John Paul Stevens, writing for the 6-to-3 court in Lehr vs. Robertson et al, ruled that the state of New York had no obligation to notify Jonathan Lehr, the natural father.

"When an unwed father demonstrates a full commitment to the responsibilities of parenthood by coming forward to participate in the rearing of his child," Stevens wrote, "his interest in personal contact with his child acquires substantial protection" under the due process clause of the Constitution. Lehr did not come forward, Stevens said, and lost the protection.

Justice Byron R. White, joined by Justices Thurgood Marshall and Harry A. Blackmun, dissented.

* The court ruled that cities and states must ensure medical treatment for someone wounded by its police officers in connection with the commission of a crime. The Constitution's due process clause requires it, the court said in a unanimous decision, but the question of who will pay for it--the hospital or the government--is a matter of state law.

The case, Revere vs. Massachusetts General Hospital, stemmed from a dispute between the city of Revere and the hospital over which would pay the expenses of a man shot while allegedly fleeing a burglary.

* The court indicated that it would once again consider modifying the "exclusionary rule," which requires the suppression of illegally seized evidence in criminal trials. The court accepted three cases raising the question of whether there should be an exception to the rule when police act in "good faith."

The court tried to rule on the issue this term in a case from Illinois, but skirted it earlier this month because of procedural flaws in the case.