The Supreme Court yesterday upheld an old law giving smaller Social Security benefits to retired men than to retired women with the same Earnings in thir working years.

Congress repealed the law in 1972. In declining to make that repeal retroactive, the court ruled out additional benefits for an estimated 9 million retired male wage earners who became 62 bfore 1975.

Congress enacted the law in 1956 to compensate women for a long history of past discrimination in the job market, the court said in an unsigned opinion.

This served an important governmental objective and consequently did not violate the constitutional guarantee of equal protection of the laws, the court held.

The court reversed a New York City federal judge's ruling that the repeal of the law in 1972 amounted to an admission by Congress that its previous policy was invidiously discriminatory.

The ruling was made in a case brought by Will Webster, a Northport, N.Y., man who applied for old-age benefits in 1974, when he was 65. He was awarded $185.70 a month. A single woman would have gotten $204, or $16.30 more.

The computers were based on the 1956 law, which applied to persons reaching age 62 by Ded. 31, 1974, and which was intended to offset the lower rates of pay women typically had gotten while employed.

Under a complex formula, the law took into account certain periods of low average earnings after 1950 for men while excluding them for women.

In a ruling last May, U.S. Districts Court Judge Thomas C. Platt said that the resulting advantage to women was justified discrimination and frrational - "no more sensible thatn providing that retirees with blue eyes should receive benefits at a rate different from that for retirees with brown eyes."

The Supreme Court said, however, that "allowing women . . . to eliminate additional low-earning years from the calculation of their retirement benefits works directly to remedy some of the effects of past discrimination."

By equalizing the treatment of men and women with the 1972 repeal, the court said, Congress "may well have decided" that the reforms it has legislated in recent years to end unequal treatment of women in the job market have lessened the jurisdiction for the unequal benefit formula in the 1956 law.

In addition, the court said, Congress "may replace one constitutional computation formula with another and make the new formula prospective only."

Chief Justice Warren E. Burger, joined by Justices Potter Stewart, Harry A. Blackmum and William H. Rehnquist, agreed with the unanimous decision but not with the reasoning.

Burger said that he finds it "somewhat difficult to distinguish the Social Security provision upheld here from that struck down so recently" - on March 2 - in a decision making old-age survivors' benefits as easily available to wideowers as to widows.

The court made the distinction by saying that the discrimination against widowers was based not on serving the important governmental objective of redressing disparate trearment of women, but on archaic assumptions about women, such as that they are "the weaken sex" or "are more likely to be child-rearers or dependents."

Without explicitly saying so, the court in the March 2 decision indicated that it would strike down a Social Security provision making old-age survivors' benefits less easily availble ot husbands than to wives.

The court did that yesterday by affirming a lower-court ruling, thus making monthly benefits ranging from about $100 to $400 - Depending upon widely 200,000 aged husbands of wives who had worked and paid Social Security taxes. PRISONS AND REFORM SCHOOLS

In 1975, U.S. District Court Judge Charles Scott ruled that overcrowding in Florida's prisons, where he found inmates caged "like animals in a zoo" and stacked "like chattel in a warehouse," violated the constitutional prohibition against cruel and unusual punishment.

Acting on a complaint brought by two prisoners, Michael Costello and Robert Cekestineo, Scott ordered the state to reduce its inmate population or increase prison capacity to human levels. Florida laws forbid penal conditions "injurious to the mind or the body.%

In Texas, meanwhile, five nonprofit groups concerned with children filed a suit charging that Texas was violating its own laws requiring that delinquent youths be confined only when necessary to treat and rehabilitate them.

U.S. District Court Judge William Wasyne Justice found that five Texas state reformataries flounted the state law with widespread practices of physical abuse, inadequate medical and psychiatric care, racial segregation and cruel and arbitary punishments. He ordered the state to submit a plan to cure unconstitutionally inhumane and punitive conditions.

But the Fifth U.S. Circuit Court of Appeals revealed both judges, saying that the cures they proposed were so far-reaching that only three-judge panels could order them.

The NAACP Legal Defense and Educational Fund, Which represented the Florida prisoners, and the Mental Health Law Project, which litigated for the Texas juveniles, disagreed. so did the Justice Department, which said that requiring three-judge panels could lead to "years of pointless litigation."

Yesterday the Supreme Court agreed that "no such wasteful and uncertain mandate" as three-judge panels is required. It reversed the appeals court and sent the cases back for review of the decisions on the merits. YOUTH CORRECTION ACT

To resolve a dispute among three U.S.COurts of Appeals, the high court agreed to decide whether payment of fines can be a condition of probation under the Youth Corrections Act.