The Supreme Court agreed yesterday to decide for the first time whether the Constitution prohibits states from regulating private sexual activities between consenting adults.

The court, which for years has declined to review state laws regulating sexual conduct, will hear a case challenging a Georgia antisodomy law, which prohibits oral and anal sex.

The law, similar to those in 24 states and the District of Columbia, makes those sex acts a felony punishable by a prison term of from one to 20 years.

The act applies to heterosexual as well as homosexual activity, but as a practical matter, Georgia and other states enforce the laws almost exclusively against homosexual men.

Yesterday's action brings the court into a major gay rights controversy at a time when antihomosexual sentiment appears to be rising nationwide as a result of concern over AIDS, acquired immune deficiency syndrome.

The Atlanta case began when Michael Hardwick, a homosexual bartender, failed to pay a ticket for drinking in public. A police officer with a warrant went to Hardwick's home to arrest him.

Hardwick's attorney, Kathleen L. Wilde, said another man living in the house told the officer he did not know if Hardwick was home but suggested the officer come in and "look around."

The policeman found Hardwick in his bedroom in the midst of a sexual act with another man, Wilde said.

Charges were brought as a re- sult of the 1982 arrest, Wilde said, but the prosecutor decided not to present the case to the grand jury.

Hardwick sued the state, alleging a violation of his right to privacy. The 11th U.S. Circuit Court of Appeals said last May that Hardwick's arrest, combined with continuing state efforts to enforce the antisodomy law against homosexuals, entitled Hardwick to sue.

The appeals court did not strike down the law, but said Georgia prosecutors could not enforce it unless they could show that the law served a "compelling state interest" -- an often insurmountable legal barrier.

The appeals court, which covers Florida, Georgia and Alabama, said a constitutional right to privacy protects sexual acts in private between consenting adults.

Georgia Attorney General Michael Bowers appealed, saying the ruling would "substantially impede the ability of Georgia and her sister states to legislate in any area which touches upon moral issues."

The Supreme Court 10 years ago, in a challenge to Virginia's sodomy law, upheld the power of states to ban certain sexual acts, including acts in private between consenting adults.

The Virginia law upheld in Doe v. Virginia is similar to Georgia's.

The high court, with Justices William J. Brennan Jr., Thurgood Marshall and John Paul Stevens in dissent, in effect ruled that no privacy right protects adults engaged in sexual activity.

In that case, however, the court summarily upheld the law without hearing arguments and without issuing an opinion. Such summary affirmances of lower court rulings, however, are binding on lower courts.

The 1976 case has been used in numerous challenges to sodomy laws as the controlling Supreme Court precedent in this area.

The Atlanta appeals court, in direct contrast to recent opinions by federal appeals courts here and in New Orleans, said the 1976 ruling did not settle the issue.

The Atlanta three-judge panel said a 1977 Supreme Court case created doubts about the scope of the Virginia decision.

The court during recent terms has declined to review cases involving private sexual activity among adults, often allowing contradictory lower court rulings to stand.

Gay rights representatives yesterday said the court needed to resolve the legal issues in the case, Bowers v. Hardwick.

"We have had 13 years of challenges to these laws," Lambda Legal Defense and Education Fund official Nancy Langer said in an interview.

"The court has never considered the challenges and it is time that it" addressed the antisodomy laws, she said.

Some states in the last decade have repealed longstanding sodomy laws and courts in two states have struck down antisodomy statutes.

But an effort by the D.C. City Council to change its law was overwhelmingly defeated in Congress four years ago.

In other action yesterday, the court:

*Declined to hear an appeal in a libel case involving a high school wrestling coach in Ohio. The justices let stand a Ohio Supreme Court ruling that the coach was not a "public figure." The case is The Lorain Journal v. Milkovich.

*Agreed to decide the constitutionality of a federal law that prohibits former mental patients from owning a firearm. The case is U.S. Department of the Treasury v. Galioto.