The State Department yesterday recommended that visas be granted to more than 400 anti-nuclear activists whose links to allegedly communist organizations initially had caused the department to deny their requests to attend a U.N. disarmament conference in New York.

The original mass turndown of their visa requests had led to strong protests from U.S. peace groups. The American Civil Liberties Union yesterday filed suit in U.S. District Court in New York in an attempt to compel Secretary of State Alexander M. Haig Jr. and Attorney General William French Smith to grant the visas.

When the issue came to public attention Wednesday, State Department spokesmen said theey had no choice but to reject the visa applications under the provisions of the McCarran-Walte Act.

However, department spokesman Alan Romberg also noted that the cases of those rejected were being studied under a second law that allows waiver of the statute barring entry to those with alleged communist affiliations.

Yesterday the department announced that it had recommended to the Justice Department the granting of waivers in what Romberg called "the great majority" of the cases at issue.

Romberg said that included 380 Japanese citizens who are members of Gensuikyo, an organization affiliated with the World Peace Council, which U.S. officials contend is, in turn, linked to the Communist Party of the Soviet Union.

The precise number of people involved in the controversy was not clear. However, Arthur Brill, a spokesman for the Justice Department, which must make the final decisions, said last night that 50 waivers already have been granted to persons with letters of invitation from the United Nations. Another 376 cases, referred by the State Department with a recommendation that visas be issued, were still under consideration, he said.

Brill said he did not know whether decisilons would be made before the start of the U.N. conference on Monday or a march and rally planned by antinuclear activists for June 12 that New York City police say could attract from 300,000 to 500,000 people to the United Nations and Central Park.

The original denials of visa applications did prevent four persons invited by the United Nations from attending yesterday's opening session of a U.N.-sponsored, twoday, preconference journalists' meeting.

Among the four was Wieslaw Gornicki, a Polish former journalist who now is spokesman for the military regime that asusmed power in Poland in December.

The exclusion of Gornicki and the others meant that attendance at the journalists's session was tilted heavily in favor of the West.

It also reinforced suspicions among some protesting groups that the Reagan administration has been taking refuge in the McCarran-Walter restrictions to impede participation in the conference by those it considers hostile to U.S. policy and, in the case of Gornicki, to underscore U.S. hostility toward the Polish regime.

That has been denied by administration officials and, because of continuing confusion about the numbers and identities of those whose visas are in question, it was not immediately clear whether the situation was due to legal problems or was a result of administration policy.