Marking the largest demonstration in postwar Germany, about a quarter of a million people rallied in this West German capital today to protest Atlantic Alliance plans to station U.S.-made, medium-range nuclear missiles in Western Europe.

The demonstrators filled a large park beside Bonn's 18th century university building and flowed over into other downtown areas.

Drawing together a colorful mix of groups ranging from Communists and left-wing activists to churchmen, students and even a batch of soldiers, the rally reflected the growing cohesion of West Germany's expanding peace movement.

The demonstrators' main aim was stated in a summons for today's protest signed by more than 850 mostly leftist groups. "We in Europe are particularly threatened by the stationing of new nuclear weapons," it said, and demanded that NATO governments withdraw their consent for the 1979 alliance decision to deploy Pershing II and cruise missiles beginning in late 1983. The statement included a call for a nuclear-free Europe.

The protest was taken by Bonn officials as an attack on the position of West German Chancellor Helmut Schmidt, who has staked his future as government leader on West Germany's continued support of the NATO missiles decision, which also included a Western offer to the Soviet Union to negotiate limits on European nuclear weapons.

Organizers -- two peace groups associated with the united Protestant Church here -- chartered 3,000 buses and 42 trains to bring the protesters from around West Germany and neighboring West European countries. About 10,000 of the participants came from the Netherlands, Denmark and Belgium. Several more peace demonstrations are scheduled this autumn with the next three set for Brussels, Amsterdam and London.

Today's protest attracted five times more people than were involved in the tense, angry demonstration held four weeks ago in West Berlin on the occasion of Secretary of State Alexander M. Haig Jr.'s visit, but it was notably more relaxed and controlled.

Government officials had feared chaos here. But the demonstrators, policing themselves, held several small trouble-making groups in check. A blend of music, picnicking and lounging on the city's parks and sidewalks gave the event a sort of festival air.

Standing in an autumn chill under gray skies, the demonstrators sported buttons with doves, crossed out atom bombs and praying figures in a show of the paraphernalia the movement has spawned. Their assorted banners included attacks on President Reagan ("Reagan's Peace Is Our Death"), religious appeals ("Christ Is Our Peace"), expressions of fear ("No Hiroshima"), and self-admonishment ("The main Enemy Rests in Our Own Land -- And It Is Called German Imperialism").

In recent days, the rift within Schmidt's own Social Democratic Party over how to deal with the antimissile campaign has deepened by sharpening differences between Schmidt and Party Chairman Willy Brandt on future political strategy.

Brandt, an ex-chancellor, appeared sympathetic to party members who wanted to participate in today's protest, arguing that the Social Democrats are still in a position to integrate parts of the peace movement that are being claimed by more left-wing alternative groups.

Schmidt, in contrast, has been inclined to write off most of the demonstrators as irretrievable for the party.

During a fiery parliamentary debate yesterday, the chancellor said he regretted that the organizers of the demonstration were ignoring Bonn's efforts to secure peace by pressing for U.S.-Soviet arms control negotiations. Schmidt would have preferred that party members be discouraged from participating in the rally.

More than one-quarter of the Social Democratic members of parliament, and about one-third of the parliamentary members belonging to the Free Democrats, the government's junior coalition partner, endorsed the demonstration. About 60,000 Social Democrats turned out for today's protest, according to a spokesman for the party's youth wing.

"If the chancellor thinks we want to press him, he's right," declared Erhard Eppler, a member of the Social Democrats' executive committee and a featured speaker at the rally.

Eppler described the peace movement's general aim as wanting "to break the chain of armament and rearmament that is pulling us all toward an abyss."

His speech carried a strong note of defiance and an undertone of German nationalism. In a barb against the Reagan administration, Eppler said, "We won't let ourselves be browbeaten any longer by people, such as Defense Secretary Caspar Weinberger, who first try to make us afraid of the dynamics of the communist world revolution and then publicly contemplate whether in the near future the Soviet system will end with a big bang or with a whimper." This was a reference to a remark by Weinberger in a recent West German magazine interview.

"The peace movement shows that the old nations of Europe are more than just chess men on the board of the world powers, both world powers," Eppler said.

Among the dozen other West German speakers who shared the platform with Eppler was former Berlin mayor Heinrich Albertz, who claimed that according to the current strategic plans "Germany will be in both of its parts a shooting gallery of the superpowers."

Other speakers included Nobel Prize-winning writer Heinrich Bo ll and leading members of the Free Democrats, environmentalists and trade unions.

Music, borrowing heavily from U.S. antiwar tunes, punctuated the day's speeches. The crowd sang John Lennon's "Give Peace a Chance" and ended the rally with "We Shall Overcome." In a special guest appearance, singer Harry Belafonte added new words to the melody of "Down by the Riverside" and sang a song he called "Tell Mr. Reagan, Lay Down the Neutron Bomb."

Another U.S. guest, Coretta Scott King, the widow of slain civil rights leader Martin Luther King Jr., assured the protesters that "the movement for peace and economic justice" in the United States is strong and supportive of Western Europe's campaign against nuclear weapons.

The rally took place several blocks from the chancellery, but the government building was not made an object of the demonstration, and Schmidt was in Cairo today attending the funeral of slain Egyptian president Anwar Sadat.