The Supreme Court, stepping into two of the nation's most divisive controversies, yesterday agreed to hear appeals in cases involving the power of states to restrict abortions and the constitutionality of voluntary affirmative-action plans for public employes.

In the abortion case, the justices said they would consider Pennsylvania's arguments that an appeals court last year improperly struck down major portions of a 1982 law placing certain restrictions on abortion. The case was brought by doctors, family-planning groups and others.

The Pennsylvania law does not directly challenge the abortion right established by the Supreme Court in 1973. But some of its provisions, the 3rd U.S. Circuit Court of Appeals said, would impermissibly "encroach" on the right to abortion.

The law required that minors obtain parental consent or a court order before abortions could be performed; that doctors use certain abortion procedures aimed at keeping alive potentially viable fetuses, and that patients be advised of "detrimental effects" of abortion and of the availability of financial assistance or adoption alternatives if the woman does not have an abortion.

In 1983, the high court, in a 6-to-3 ruling on a case from Akron, Ohio, reaffirmed its 1973 ruling and struck down restrictions in a law similar to Pennsylvania's.

It was not clear yesterday why the court decided to revisit some of those issues, but at least four justices voted to hear the state's appeal in Thornburgh v. American College of Obstetricians and Gynecologists.

The justices also agreed to consider for the first time whether cities and public employe unions have the power to agree voluntarily to racial preferences in hiring public employes.

The case, which involves a teacher layoff plan in Jackson, Mich., could clarify what one appeals judge called the high court's "sometimes inscrutable" prior decisions upholding certain affirmative-action plans.

It also could define the scope of the court's decision last year in a case involving Memphis firefighters -- a ruling relied upon by the Reagan administration to bolster its campaign against racial preferences in hiring and promotions.

In the Memphis case, the high court ruled that seniority rules outweighed hiring gains made by minorities and women under affirmative action and that judges could not order white firefighters laid off to retain blacks with less seniority.

The Michigan case involves a 1972 collective-bargaining agreement between the teachers' union and the school board. The contract includes a goal that the percentage of minority teachers approximate the racial makeup of the students, and it protects minorities from layoffs even if that means laying off white teachers with more seniority.

Ten white teachers who were later laid off sued the school board in 1981, contending that racial preferences were unconstitutional. The white teachers, citing the Memphis case in their appeal to the high court, argued that there was no evidence of past discrimination by the board that had to be remedied and that none of the blacks retained were "identified victims of past discrimination."

The school board countered that the contract was constitutional because it was voluntarily negotiated by the board and adopted by the union, which is 85 percent white. The board cited a 1979 Supreme Court ruling (United Steelworkers of America v. Weber) that upheld a private employer's affirmative-action plan even though there had been no proof of past discrimination.

The 6th U.S. Circuit Court of Appeals, citing the 1979 decision, upheld the contract. The appeals court said the Memphis case was different because it was a court-ordered plan, while the Jackson case was voluntarily negotiated.

The case, Wygant v. Jackson Board of Education., will be argued in the fall.

The justices also agreed yesterday to decide what actions cities may take under the First Amendment to regulate the location of "adult" theaters and bookstores to protect neighborhoods and downtown areas.

The case involves Renton, Wash., a suburb of Seattle. The town, relying in part on a 1976 Supreme Court decision, attempted to require all "adult" businesses to locate within a 520-acre commercial area.

A movie theater owner challenged the law, saying that much of the land was occupied by factories and other businesses and was unusable, and that the motive behind the zoning law was to keep out such theaters.

The 9th U.S. Circuit Court of Appeals last year overturned the town's plan, agreeing that much of the acreage was unusable and that one factor motivating passage of the zoning ordinance was a desire to restrict the free-speech rights of adult movie theater owners.

In its appeal, the 32,000-resident city said its efforts were constitutional and that a small community was unlikely to have much space available for such businesses.

A 1976 Supreme Court decision said cities may use zoning ordinances to disperse such theaters or concentrate them in one area. But Renton's lawyers argued that the decision has been of little help because most federal courts have struck down efforts by cities to zone adult entertainment. The case is City of Renton v. Playtime Theatres Inc.