The Supreme Court yesterday ruled that the widespread and time-honored practice of having chaplains open state legislative sessions with prayer does not violate the Constitution.

The 6-to-3 vote struck down an appeals court decision that barred the practice in the Nebraska Legislature as a violation of the First Amendment's prohibition against government sponsorship of religion.

Virtually every state legislature and both houses of Congress begin daily legislative sessions with some form of prayer or some reference to God, continuing traditions begun in colonial times and followed by the Supreme Court itself. Citing that history yesterday, Chief Justice Warren E. Burger said the practice, including government payment to a chaplain and use of "Judeo-Christian" prayers, presented no threat to the Constitution.

"To invoke Divine guidance on a public body entrusted with making the laws is not, in these circumstances, an 'establishment' of religion or a step toward establishment," Burger wrote. "It is simply a tolerable acknowledgement of beliefs widely held among the people of this country."

The decision may doom a pending lower court challenge to Congress' use of a paid legislative chaplain. It also staves off what Justice William J. Brennan Jr., one of the dissenters, predicted would have been a "furious reaction" had the court ruled the other way.

And while it conforms with an increased Supreme Court tolerance for government support of religious activity in recent opinions, such as last week's approval of tuition tax deductions, it is expected to have no serious impact on the court's traditional ban on prayers in public schools.

Yesterday's case, Marsh vs. Chambers, began with a 1979 complaint brought by Ernest Chambers, a member of Nebraska's unicameral legislature.

Since 1965, Nebraska has employed the same Presbyterian minister to say the opening prayer. The 8th U.S. Circuit Court of Appeals ordered an end to the practice, basing its decision in part on what it said it felt was an implicit endorsement of a single religion suggested by Nebraska's continued use of a Presbyterian clergyman. Burger said the clergyman might have been kept on simply because the Nebraska lawmakers felt he was doing a good job.

The chief justice based most of his opinion yesterday on history.

"The opening of sessions of legislative and other deliberative public bodies is deeply embedded in the history and tradition of this country," he said. "From colonial times through the founding of the Republic and ever since, the practice of legislative prayer has coexisted with the prinicples of disestablishment and religious freedom.

"In the very courtrooms in which the United States district judge and later three circuit judges heard and decided this case, the proceedings opened with an announcement that concluded, 'God Save the United States and this honorable court,' " Burger said.

"The same invocation occurs at all sessions of this court," he noted.

He said it was especially noteworthy that the first session of the U.S. Congress voted to appoint and pay a chaplain for each house, even as it was approving the draft of the First Amendment for submission to the states. "Clearly the men who wrote the First Amendment religion clause did not view paid legislative chaplains and opening prayers as a violation of that amendment," he said.

Brennan, joined in dissent by Justice Thurgood Marshall, responded that the same Congress also required certain thieves to be punished by public whipping, not to exceed " '39 stripes.' " Brennan said the "sort of historical argument" made by Burger "should be advanced with some hesitation in light of certain other skeletons in the congressional closet."

"Legislative prayer," Brennan wrote, "clearly violates the principles of neutrality and separation that are embedded" in the First Amendment. ". . . It intrudes on the right to conscience by forcing some legislators either to participate . . . or to make their disagreement a matter of public comment by declining to participate. It forces all residents of the state to support a religious exercise that may be contrary to their own beliefs," he said.

It "has the potential for degrading religion by allowing a religious call to worship to be intermeshed with a secular call to order."

Justice John Paul Stevens wrote a separate dissent: "Regardless of the motivation of the majority that exercises the power to appoint the chaplain, it seems plain to me that the designation of a member of one religious faith to serve as the sole official chaplain of a state legislature for a period of 16 years constitutes the preference of one faith over another" in violation of the Constitution.

In other action yesterday:

* Burger announced that the court hoped to finish its term today, tying a record for the longest term. Court terms begin on the first Monday in October and generally end during the last week of June. Three important issues, involving the legality of home videotaping, sex discrimination in pensions and insurance and the procedure for death penalty appeals, remain.

* The court said law enforcement authorities in Chicago did not violate the Constitution when they reopened a container allegedly holding marijuana after a "controlled delivery" to its intended recipient.

Customs officers first found the alleged marijuana when they opened a table on its arrival at an airport from Calcutta. They then resealed it and had it delivered to the addressee, John Andreas, by Drug Enforcement Administration agents and Chicago police posing as delivery men.

When they saw Andreas leaving with the table between 30 and 45 minutes after the delivery, they arrested him and reopened it without a warrant. The Appellate Court of Illinois suppressed the evidence, saying the reopening constituted an illegal search.

Writing for the 6-to-3 court yesterday, Burger said such a reopening during a controlled delivery is proper when there is no "substantial likelihood that the contents have been changed."

Brennan, joined by Marshall, dissented. Stevens filed a separate dissent in Illinois vs. Andreas.

* The justices ruled that court-appointed lawyers have no constitutional obligation to raise every non-frivolous issue requested by a defendant appealing his conviction.

The decision struck down a 2nd U.S. Circuit Court of Appeals decision that said failure to raise all the requested issues constituted ineffective assistance of counsel. Burger wrote for the court in Jones vs. Barnes. Justice Harry A. Blackmun wrote a separate concurrence while Brennan and Marshall dissented.

* The court limited the application of part of the post-Civil War Ku Klux Klan Act, which prohibits mob violence against people exercising their civil rights. Justice Byron R. White, writing for a 5-to-4 court, said it cannot be used to sue a union whose members allegedly beat workers on a non-union project.

The section at issue, 1985, White said, only prohibits conspiracies involving local or state governments, not private conspiracies. He also said the section, designed largely to deal with racially motivated violence, does not apply to conspiracies motivated by views about unions. Blackmun, joined by Brennan, Marshall and Justice Sandra Day O'Connor, dissented in United Brotherhood of Carpenters & Joiners, Local 610, et al., vs. Scott et al.

* The court struck down a Texas bank tax because it illegally taxed U.S. obligations. The case, American Bank & Trust Co., et al, vs. Dallas County et al, arose because a property tax computed on the basis of the banks' assets failed to allow a deduction for the value of federal notes and bonds. Blackmun wrote the opinion. Justice William H. Rehnquist, joined by Stevens, dissented.