The Supreme Court agreed yesterday to decide whether federal judges can order the highest tribunal of a state to pay attorneys' fees for groups that successfully challenge one of the tribunal's judician acts.

The justices will hear an appeal by the Virginia Supreme Court and its chief justice, Lawrence A. I'Anson, in a case arising from an effort by Consumers Union of the United States and the Virginia Citizens Consumer Council to publish a consumers' directory of Arlington Country lawyers.

Virginia Attorney General Marshall Coleman, in a brief for the state court, contends it is protected by the doctrine of "absolute judicial immunity" from an order to pay about $121,000 -- in public funds -- to CU and the council for lawyers' feeds incurred to trying to publish the guide.

The contention is backed in friend-of-the-court briefs filed by the attorneys general of 2i states, including Maryland, and by another state body, the Conference of Chief Justices.

By contrast, Cu and the council say that judicial immunity does not shield state judges from court orders accusing them of infriging constitutional rights.

The case began in 1974, when CU sent out questionaires for the proposed directory in which information was sought on, among other things, initial consulation charges and billing and credit arrangements.

Virginia lawyers were prohibited from disclosing just such financial information by a rule in the Virginia Code of Professional Responsibility, which is enforced by the state high court. Code violators are subject to disciplinary action.

The Virginia State Bar warned Arlington lawyers against violating the rule. CU then asked a panel of three federal judges in Richmond to declare the rule of violation of the protection of commercial speech guaranteed by the First Amendment.

In December 1976, the panel held that the directory could be published and could include initial consultation fes. But the panel said that the directory could not include information on hourly rates, which CU also had sought.

Meanwhile, Congress passed the Civil Rights Attorneys' Fees Act, which authorizes compensation of attorneys who vindicate basic right. Then, in June 1977, the U.S. Supreme Court handed down its so-called Bates decision allowing lawyers to advertise truthful information on the fees they set for performing routine legal services.

With the, CU asked the panel to rule that it was entitled to attorneys' fees and to publish a directory including fee information consistent with the Bates decision.

Last May, the panel ruled unanimously that CU and the council are entitled to publish the directory. But the panel split on whether the Virginia Supreme Court must pay their attorneys' fees.

Judge Robert R. Merhige Jr., for himself and Judge Albert V. Bryan Jr., wrote that the result of immunizing the state court "would be that private parties with meritorious civil rights claims against government defendents would be prevented by the specter of substantial legal costs from bring . . . actions for injunctive relief. This is precisely the impediment to enfocement of the Civil Rights Act which Congress . . . sought to eradicate."

In the dissenting opinion, Judge D. Dortch Warriner found it "highly unseemly" for a federal court to award attorney's fees against the Virginia Supreme Court, "a court of greater dignity."

Meanwhile, the disciplinary rule -- held by the panel to be unconstitutional on its face -- remains in force.

The court took other actions. BAIL FOR RAPE DEFENDANTS

Last November, Nebraskans adopted a state constitutional amendment saying that all offsenses shall be bailable "except for treason, sexual offenses involving penetration by force or against the will of the victim, and murder where proof is evident or the presumption great."

Two months later in Omaha, Terry G. Parker was charged with rape. Municipal magistrates twice refused to release him on bond, and the state Supreme Court affirmed.

Parker sought U.S. Supreme Court review, alleging violation of his constitutional rights to equal protection of the laws, to the protection against excessive bail, and to be free from cruel and unusual punishment. The court denied his petition, 6 to 3. DESERT LAND

The court agreed to decide whether an 1894 federal law requires the Interior Department to hold indefinitely some 2.4 million acres of desert land in Idaho in event the state eventually may want to select all or part of it for irrigation and reclamation.