The Supreme Court yesterday upheld a life prison sentence for a swindler whose take totaled $229.11.

William James Rummel, who netted the sum from three separate crimes, received the sentence under a Texas law requiring life imprisonment for anyone convicted three times of a felony.

The justices rejected, 5 to 4, the claim that the sentence was too harsh. They also upheld, for the second time in recent years, the concept that "habitual offender" laws in Texas and at least 12 other states are valid deterrents to repeated crime.

Eight years separated Rummel's three convictions. In 1964, when he was 20, he illegally bought four tires for $80 with someone else's credit card. w

In 1969, he forged a check for $28.36 to pay his rent at San Antonio's Three Dollar Motel.

In 1972, he was convicted of accepting $120.75 as payment for air conditioner repairs that he never made. The final conviction made him a "habitual offender" with a life sentence.

Justice William Rehnquist, for the majority, ruled that punishments should be determined by state legislatures, not federal courts, unless the states breach constitutional bars against cruel and unusual sanctions.

Rummel's sentence was not a breach, Rehnquist wrote, nor was it "grossly disproportionate" to the crimes, although they were nonviolent and relatively unprofitable.

"One in Rummel's position has been both graphically informed of the consequences of lawlessness and given an opportunity to reform, all to no avail," Rehnquist wrote. ". . . Having twice imprisoned him for felonies, Texas was entitled to place upon Rummel the onus of one who is simple unable to bring his conduct within the social norms prescribed" by the law.

Rummel, who has served seven years, will be eligible for parole in another four, his lawyer said yesterday.

Rehnquist was joined by Chief Justice Warren Berger and Justices Potter Stewart, Byron White and Harry Blackmun. Justice Lewis Powell wrote a dissent, joined by Justices William Brennan, Thurgood Marshall and John Paul Stevens.

Rummel's sentence, Powell wrote, "would be viewed as grossly unjust by virtually every layman and lawyer . . . A mandatory life sentence for defrauding persons of about $230 crosses any rationally drawn line" of the Constitution.

In another 5-to-4 decision yesterday, the court struck down a Texas law to prevent the showing of obscene films.

The law allowed authorities to shut down a theater with a court injunction to prevent the future showing of a film, even before a full court hearing judged it obscene.

This is "prior restraint" on free speech, the justices said in an unsigned opinion. "'Any system of prior restraints of expression comes to this court bearing a heavy presumption against its constitutional validity,'" the court said, quoting a 1963 decision.

The Texas law is invalid because it does not require full hearings and other procedural safeguards, the court said.

Burger, Powell, White and Rehnquist dissented in the case, Vance vs. Universal Amusement Co.

In a third decision yesterday, the court ruled that the Environmental Protection Agency may issue or deny discharge permits without formal hearings.

The agency had extended without hearings a permit allowing discharge of treated sewage from a Los Angeles treatment plant in 1974. The extension was challenged by the Sacramento-based Pacific Legal Foundation.

Blackmun wrote that requiring hearings in every case would "raise serious questions" about the administration of the Environmental Protection Act.

The court also ruled yesterday that state and local governments may not take Indian lands for public use without first going into court for condemnation hearings.