A coalition of civil-rights and public-health groups yesterday filed suit against the presidential AIDS commission, charging that the advisory panel violates federal law because it lacks representatives of groups most affected by its work and contains members whose "extreme viewpoints" are not balanced by those with "more mainstream views."

The lawsuit, filed in U.S. District Court here by the American Civil Liberties Union, the American Public Health Assocation, Public Citizen Health Research Group, several AIDS organizations and a person with AIDS, claims that the panel violates the Federal Advisory Committee Act. The law requires such commissions to be "fairly balanced in terms of points of view."

It asks the court to bar the panel from further work until new members are appointed. Also named as defendants are President Reagan and Health and Human Services Secretary Otis R. Bowen. A hearing is expected to be held in the next several weeks.

Officials at the commission and HHS declined to comment. A White House spokesman declined to comment on the lawsuit but said the administration thinks that the commission has a "great diversity of opinion and balance." The Justice Department, which will be defending the suit, has 60 days to respond.

The commission, appointed in July as an expression of Reagan's concern about the spread of acquired immune deficiency syndrome, is charged with advising him about the legal, medical, ethical, social and economic impact of the disease. It has been beset with infighting and organizational problems and has been criticized by public-health officials and gay-rights groups because of the controversial views of some members and its members' lack of expertise on AIDS.

Last month the ACLU and Public Citizen sent two letters to the White House challenging the composition of the panel and asking it to appoint new members.

In an Oct. 2 letter, White House counsel Arthur B. Culvahouse said the commission "fully meets the requirements of balanced membership," singling out its chairman, Dr. W. Eugene Mayberry, and vice chairman, Dr. Woodrow A. Myers Jr. Both officials resigned Oct. 7, citing infighting and ideological differences. Retired admiral James D. Watkins, a panel member, was elevated to the chairmanship.

White House officials said they plan to appoint two members to replace Mayberry and Myers, possibly a person with AIDS or the relative of an AIDS patient. Watkins said yesterday that he hopes the White House will appoint doctors who are AIDS experts.

Watkins, former chief of naval operations, also said he plans to recommend that a clinical advisory panel be established to help the commission review issues of treatment and clinical care.

In addition to the absence of AIDS experts, the lawsuit challenges the lack of AIDS patients, those familiar with the problems of intravenous drug abusers or representatives of minority groups that comprise a disproportionate number of AIDS cases. When Myers, Indiana's health commissioner resigned, the panel lost its only black and only public health official.

At a news conference yesterday, ACLU attorney William B. Rubenstein said that the suit presents Reagan with "a good opportunity to get this commission off the ground on the right foot." New members, he said, would not have to spend much time catching up because "so far this commission has accomplished nothing."

The commission, which will meet today in closed session, is scheduled to meet Friday to discuss its preliminary report, which is due Dec. 7.