The Supreme Court, acting in a case involving the 310,000-member American Bar Association, ruled yesterday that tax-exempt organizations must pay taxes on profits they earn from the sale of group insurance to their members and members may not deduct that part of their premiums as charitable deductions.

The court ruled 6 to 1 that organizations that undertake such fund-raising efforts, even when proceeds go to charitable purposes, are involved in a "trade or business" for purposes of federal tax laws.

"This case presents an example of precisely the sort of unfair competition between tax-exempt organizations and taxable businesses that Congress intended to prevent by providing for the unrelated business income tax," Justice Thurgood Marshall said for the court.

The Reagan administration had argued that such programs could cost the government hundreds of millions of dollars in lost tax revenues. At issue in this case, U.S. v. American Bar Endowment, were tax assessments totaling about $6 million for three years from 1979 to 1981.

All bar members are automatically members of the endowment and eligible to participate in the group insurance plan. About 57,000 lawyers do so. The endowment's policies, charged at competitive market rates, pay dividends that are the difference between the total premiums paid by policyholders and the total expenses each year. Lawyers in the plan must sign over their rights to those dividends and the money is pooled and used to support endowment activities. The lawyers then were able to claim tax deductions for the dividends.

Because ABA members are a good insurance risk, the insurance program has always run at a substantial profit, bringing in more than $80 million in the past 33 years. Tax deductions for members average about $50 a year.

Marshall said the scheme runs afoul of federal law on such "unrelated businesses" by charities, because it makes the effective cost of the American Bar Endowment's insurance lower than the cost of other policies that do not offer the tax benefits.

Justice John Paul Stevens, in dissent, said the basic purpose of the tax law was to protect "commercial enterprises from the unfair competition that may be generated by the operation of competing businesses by tax-free organizations. There is no evidence in the record," he said, "to support the notion that the endowment's provision of insurance to its members had had any competitive impact whatsoever."

Justices Lewis F. Powell Jr. and Sandra Day O'Connor took no part in the decision.

In another ruling yesterday, the justices split narrowly and bitterly in a death penalty case, ruling 5 to 4 that Florida murderer Willie Jasper Darden was properly convicted and sentenced. The court rejected a claim that a prosecutor's impassioned closing argument calling Darden an "animal" who deserved to die violated the defendant's rights.

Darden, one of the longest-term death row inmates in the United States, was convicted of the 1973 murder of a furniture store owner during a robbery. His sentence was stayed pending the outcome of this case after four justices agreed to hear it. Powell agreed to provide the needed fifth vote to stay the execution so the court would not be hearing the appeal of a dead man.

Powell, writing for the majority in Darden v. Wainwright, said yesterday the prosecutor's remarks, while improper, did not violate Darden's constitutional rights. In addition, Powell rejected Darden's arguments that the jury selection was flawed and that his attorney did not adequately represent him.

Justice Harry A. Blackmun, in a harsh dissent joined by Justices William J. Brennan Jr., Marshall and Stevens, said the ruling "reveals a court willing to tolerate not only imperfection but a level of fairness and reliability so low it should make conscientious prosecutors cringe."