The Reagan administration asked the Supreme Court yesterday to allow voluntary student religious groups to meet and pray in public high schools during extracurricular activity periods.

U.S. Solicitor General-designate Charles Fried said an appeals court ruling last year forbidding such meetings in Williamsport, Pa., cast a "grave constitutional doubt" over Congress' later passage of the Equal Access Act. That law requires high schools receiving federal funds to allow student religious groups the same access to school facilities as other groups have.

The case, which has divided religious groups on both sides, is being watched closely to see which way the court is leaning this term on church-state matters.

The court, strongly reaffirming court rulings under former chief justice Earl Warren, last year prohibited religiously motivated "moments of silence" in the public schools.

In 1981, the court said religious groups have the same rights as other groups to use state university facilities. But the justices indicated they might not come to the same conclusion in a case involving younger, more "impressionable" people.

Fried argued that Congress, in passing the Equal Access Act, "concluded that high school students are sufficiently mature" to understand that simply allowing religious groups to meet does not mean state endorsement of religion in violation of the First Amendment.

Congress "must be afforded the highest degree of deference in that judgment," Fried said.

The case began in 1981 after 45 of Williamsport High School's more than 2,000 students formed a religious club. The students wanted permission to meet during school hours at a time set aside for a wide array of student club meetings. Students also may study by themselves during the half-hour period.

A federal judge ruled for them, and the group met during the 1983-84 year with 20 to 45 students attending. The 3rd U.S. Circuit Court of Appeals overruled the judge, saying that such meetings would violate the constitution's required separation of church and state.

Several justices, especially John Paul Stevens, Sandra Day O'Connor, and William J. Brennan, raised the possibility that the court may not rule on the constitutional issues because of procedural problems in the case.

Those justices, in questioning the attorneys yesterday during the hour-long hearing, said they were not sure the court could properly decide the case because the district court ruling was appealed by a single school board member, not by the entire board.

That board member, attorney John C. Youngman Jr., argued that he could properly appeal the case and that the meetings unconstitutionally advanced religion.

James M. Smart, arguing on behalf of the student club, said religious speech enjoyed the same First Amendment protections as any other speech.

Justices Harry A. Blackmun and Thurgood Marshall questioned Smart about the degree of teacher involvement in the prayer group meetings. Smart said that faculty members simply monitored the meetings.

But Blackmun quoted school board policies that said teachers were to supervise meetings. Smart maintained that the club was student-run.