The disclosure that the Soviet submarine stranded in Swedish waters apparently was carrying nuclear weapons was intepreted by Western diplomats here as a complicating factor in East-West arms talks and a major setback to the Kremlin in attempting to win European support for its policies.

It is seen as undermining the credibility of Moscow's claims that the United States is recklessly deploying nuclear arms in various parts of the world.

In this context, the disclosures made in Stockholm today are viewed as seriously damaging to the Soviet effort to persuade Western Europe to reject the scheduled deployment of new U.S. medium-range missiles in the region.

A perhaps more important aspect of the affair, however, is its impact on the coming talks in Geneva on curbing medium-range nuclear arms in Europe.

The possibility that conventional Soviet submarines are carrying nuclear warheads is seen by diplomats as adding a new wrinkle to the already complicated calculations in assessing the relative balance of nuclear forces in the European theater.

The submarine that ran aground near Sweden's major naval base had been regarded by Western specialists as a relatively obsolete Whiskey-class vessel armed only with conventional weapons.

About 50 vessels of this type reportedly are still in service, and there has been no speculation thus far that they may carry nuclear warheads.

The assertion by Swedish Prime Minister Thorbjorn Falldin that the diesel-powered submarine "in all probability" was carrying nuclear warheads when it went aground last week was expected to complicate the Geneva negotiations, according to the diplomats.

The only public Soviet statement on the incident, issued yesterday, maintained that the submarine was on a routine training mission in the Baltic Sea when "malfunctioning" navigational equipment led it off course and into the rocky area near the Karlskrona naval base.

Otherwise, the Soviets have maintained silence on the incident, a clear indication of the extreme embarrassment it has caused here.

Being caught in neutral Sweden's restricted military zone was a serious loss of face for the Soviets at a time when they were seeking to convince Europeans that the United States violates other countries' sovereignty.

However, the alleged presence of nuclear warheads aboard the stranded submarine is likely to incur additional political difficulties for Moscow. In recent weeks the Soviets have renewed their calls for a nuclear-free zone in northern Europe, a proposal that raised some interest in Sweden and Finland.

Following a visit to Sweden late last month by U.S. Defense Secretary Caspar W. Weinberger, Moscow has accused the United States of attempting to weaken Sweden's neutrality and draw it closer to the North Atlantic Treaty Organization. The submarine incident is likely to make such accusations look hollow.

Concern about the presence of nuclear weapons in vessels previously thought to be armed only conventionally also is likely to have an impact on public opinion in other Scandinavian countries where until now the antinuclear movement has been particularly strong.

Denmark, a NATO member, recently expelled a Soviet diplomat and brought charges against a Danish citizen in connection with the publication of newspaper ads calling for opposition to Washington's nuclear policies. The Danish government claims that the advertisements were paid for by the Soviet Union.