Defense Secretary Caspar W. Weinberger said yesterday the United States would do whatever was necessary to keep Russian missiles out of Cuba. At the same time, he played down the threats the Soviet Union made this week and instead guessed that long-delayed U.S.-Soviet talks on reducing strategic nuclear arms would get under way "sometime this summer."

Appearing on the NBC-TV "Today" show, Weinberger noted that Moscow and Washington were already discussing limits on medium-range missiles in Europe "and I'm convinced that we will do it in the strategic range, too, provided the Soviets wish to do so."

Later, State Department spokesman Dean Fischer said the United States was in the "final weeks of intensive preparations" for the arms talks.

But Fischer avoided saying talks would start this summer, repeating what the administration has said before: that they will not take place "until conditions permit," meaning some improvement in U.S.-Soviet relations and Soviet behavior internationally, such as in Poland where martial law continues.

Fischer thus seemed to be contradicting Weinberger, but other senior Defense and State Department officials suggested that Weinberger was probably right, though they cautioned that Poland and other troublespots still figure in the situation.

These officials said that the administration would like to make some move toward resumption of the strategic arms talks, or at least announce the administration's intentions, by the time President Reagan makes his first trip as president to Western Europe early in June.

All the allies want those talks to resume as a way of restoring communications between the two superpowers and perhaps ease the military and political tension that has hung over Europe as U.S.-Soviet relations have recently worsened.

In this country, a movement to freeze the nuclear arsenals of both superpowers has also been gaining support.

Yesterday, Edmund S. Muskie, one of President Carter's secretaries of state, warned that "the public senses we are about to enter a period" of greater instability in the superpower relationship, "one in which the arms race--for the first time in a dozen years--is not accompanied by the restraining influence of serious arms control talks."

In a speech here before the Council on Foreign Relations, Muskie said public confidence was being shaken during this period "in which nuclear war appears more likely to happen."

Reagan administration officials, however, also worry that Poland could erupt again this spring, possibly bringing more internal repression, and thus are reluctant to say with certainty that the arms talks will resume.

Although Fischer declined to tell reporters what type of conditions would be necessary to "permit" the talks to go ahead, he did say that those conditions do not now exist and that the situation in Poland remains "not satisfactory."

While specialists agree the United States might finish its preparatory work in several weeks, these officials also say several fundamental questions have not yet been resolved in the administration.

These range from what specific results the United States wants from the talks to a negotiating strategy designed to achieve those results.

Also said to be still undecided is the scope of strategic arms reductions to be proposed, what should be done about mobile missiles and what measurements should be used for equating the atomic striking power of both countries.

Speculation about Soviet missiles in Cuba arose earlier this week after a speech by Soviet President Leonid Brezhnev.

The Soviet leader made no mention of any specific place but warned that if the West went ahead with deployment of new missiles in Europe it would compel Moscow to take "retaliatory steps" that would put the United States in an "analogous position."

Questioned about this, Weinberger said he didn't know what Brezhnev meant "by that rather obscure . . . ambiguous phrase." But "if there is any kind of threat of that sort meaning Cuba I would assume we would deal with it in the same way we did in the 1960s," he said.

The United States in 1962 imposed a blockade of Cuba to prevent Soviet ships from delivering missiles to the island but Weinberger, under further questioning, rejected such specific comparisons. "I'm talking about whatever it would be necessary to do so as not to have missiles in the Cuban area. But we don't know that that's what he Brezhnev was talking about," he said.