Republicans yesterday rallied around President Reagan's decision to invade the island of Grenada, while Democrats were divided between condemnation over Reagan's use of force and a willingness to let events play out in the Caribbean.

But coming so quickly after the terrorist bombing of the Marine barracks in Beirut on Sunday, yesterday's invasion raised anew a problem that has plagued Reagan's presidency: a fear that he would take the nation into war.

"One day we've got the number of Marine deaths which shocked us all, and the next day we find we are invading Grenada," Sen. Lawton Chiles (D-Fla.) said. "Are we looking for a war we can win?"

The coincidence of timing tended to blur the events in Lebanon and Grenada as members of the House and Senate, the Democratic presidential candidates and politicians around the country sorted through their own feelings.

Many reacted with caution because news coming from the island of Grenada was so sketchy, but the range of viewpoints was illustrated by spokesmen for liberal and conservative organizations.

Conservative Richard A. Viguerie, who has attacked Reagan on everything from his personnel appointments to his handling of the South Korean airliner downing by the Soviets, called the invasion the president's "finest hour," while Leon Shull, national director of the liberal Americans for Democratic Action, said it was an "outrageous example of gunboat diplomacy."

Democrats privately predicted that even if the public rallies behind the president, the events of this week will lead to searching questions about Reagan's handling of foreign affairs and said the issue would become a central theme in the political debate of next year's presidential campaign.

"Pretty soon, the public will think that Reagan sees sending in Marines as the first and not the last resort of foreign policy," said an adviser to one Democratic candidate. "That would be very damaging for him."

But yesterday senior Democrats refused to criticize the president.

"Now is not the time for the press and we in public office to be critical of our government when the Marines and the Rangers are in action down there," said House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.), who was briefed at the White House on the invasion. "We weren't asked our advice. We were informed what was taking place."

"Under the circumstances," said Rep. Clement J. Zablocki (D-Wis.), chairman of the House Foreign Affairs Committee, "the president is fully authorized to protect the security of U.S. nationals . . . . I see no alternative."

But other Democrats, already at odds with their leaders over the presence of the Marines in Lebanon, condemned Reagan's action from the House floor.

Rep. Dennis E. Eckart (D-Ohio) said the president now has a "supply-side foreign policy. We supply the troops, we supply the munitions, we supply the arms and now we supply the bodies."

U.S. combat forces "are now deployed in combat situations or near-combat situations in three areas of the world--the Middle East, Central America, and now the Caribbean," said Rep. Michael D. Barnes (D-Md.), chairman of the Foreign Affairs subcommittee on Western Hemisphere Affairs. "In no case, in my judgment, have the Congress' questions about these deployments been adequately answered. In no case has Congress been adequately consulted."

Other Democrats questioned the legality of the invasion, with Sen. Daniel Patrick Moynihan (D-N.Y.) calling it "an act of war" that the United States "does not have the right" to do.

Most Republicans, however, said Reagan's actions were justified.

"The fact is it the government of Grenada is a Marxist military dictatorship," said Sen. John G. Tower (R-Tex.), chairman of the Senate Armed Services Committee. "The island is strategically located and a Marxist presence there is not in our national interest."

Senate Foreign Relations Committee Chairman Charles H. Percy (R-Ill.) said the administration's hope "is to have our forces out very quickly, just as soon as we can and as quickly as we can restore a semblance of order."

Several Democratic presidential candidates sharply criticized Reagan yesterday for the invasion, but the two front-runners for the 1984 nomination, former vice president Walter F. Mondale and Sen. John Glenn (D-Ohio) had little to say.

Mondale said he had not been fully briefed on the invasion, but said he believed congressional leaders should have been consulted in advance. Instead, he outlined steps he would take as president to help resolve the problems in Lebanon.

"If our mission there in Grenada is to protect American lives, then we should evacuate those who want to leave and quickly remove our forces," Glenn said. "If there is a larger strategic mission, then the president should inform the Congress and the American people as to the nature, scope and duration of that mission."

But Sen. Alan Cranston (D-Calif.) jumped on Reagan for "recklessly" involving the nation "in two shooting wars in two different parts of the world at the same time," and questioned the administration's rationale.

"If it is true that Americans were threatened--and no evidence of that has been put forward--we should have acted immediately to rescue them. Why would we wait for foreign governments?"

Former South Dakota senator George McGovern (D-S.D.) called the invasion "utterly irresponsible," and Sen. Gary Hart (D-Colo.) introduced a resolution calling for the War Powers Resolution to be invoked on U.S. involvement in Grenada.

Former Florida governor Reubin Askew said Reagan did not have "any alternative" and said, "This collective action should send a strong message to Fidel Castro."

Some of the caution and confusion yesterday was a recognition by the president's political opponents that such foreign policy events often work to the benefit of an incumbent, in the short term at least. Then-President Ford's approval ratings jumped sharply after the May, 1975, rescue of the crew of the ship Mayaguez, in which 41 U.S. troops were killed. President Kennedy enjoyed his highest popularity ratings shortly after the disastrous Bay of Pigs invasion of Cuba in 1961.

These events often come back to haunt the president, however.

But both Republicans and Democrats said the sequence of the bombing in Lebanon on Sunday, in which more than 200 Marines were killed, and the invasion of Grenada yesterday make the political climate highly unstable.

Even before the events of this week, public opinion of Reagan's handling of foreign affairs has been declining. The latest Washington Post-ABC News Poll, taken in late September, showed that 50 percent of those surveyed disapproved, while 42 percent approved. That was a sharp swing from early August, when 49 percent approved and 42 percent disapproved.

The poll was taken after the Soviet Union shot down a Korean Air Lines jumbo jet, taking 269 persons to their deaths.