The victory of the Socialists in the Greek general election compounds the problems of the Reagan administration in dealing with its European NATO allies. It brings down to the already troubled southeastern flank of NATO the seeds of neutralism which are already sprouting on the left in West Germany, the Low Countries, and Britain. But just how much those seeds sprout in Greece depends on how Socialist leader Andreas Papandreou interprets the basically ambiguous program on which he campaigned and won the election.
Mr. Papandreou is, in fact, very Greek in a complicated Byzantine way. He understands his countrymen's proud sensitivities. His sweeping victory - probably 175 of the 300 seats in Parliament - is proof that he knew how to exploit them electorally.
Some outsiders interpret the election result as a mandate for him to take Greece out of the military command of NATO and out of the European Community - about which he so often talked before the election campaign really heated up. But it is more likely that most of those Greeks voting for him did so because of a widespread desire:
* For change, since the right in one form or another has run Greece since the end of World War II. (Disappointed economic expectations under the now-ousted New Democracy Party increased the pressure for change.)
* To punish the West, and the US in particular, for taking Greece for granted and for failing to recognize its unique role in history as a champion of democracy and Christianity.
* To obtain leverage and improve Greece's bargaining position in its longstanding struggle with Turkey-particularly on issues of sovereignty in the Aegean and Cyprus.
Mr. Papandreou has already announced that he will meet President Kyprianou of Cyprus in Athens Oct.23.
It is particularly galling to Greeks that their Western allies do not automatically favor Greece over Turkey on every issue. But geopolitics prevent that.
First, Turkey is much more strategically placed as a piece of real estate than is Greece when it comes to Western defense planning. Turkey not only has a common border with the Soviet Union, but it also lies astride the latter's only shipping route between the Black Sea and the Mediterranean. The value to the US of access to military and monitoring facilities on Turkish territory is therefore self-evident.
Second, with a population four times that of Greece, Turkey has more men in its army than any other European member of NATO. Consequently the US has an obvious interest in not alienating Turkey and in ensuring that its manpower is available on the West's side in an emergency.
It is also worth noting that Turkey has a dual geographical role. It is on NATO's southeastern flank. It is also on the northwestern flank of the strategic area involved in US defense planning for the security of the oil-rich Gulf.
In 1974, Greece withdrew from the NATO command structure to show its displeasure with the US for not having stopped Turkish military intervention in Cyprus that year. Outgoing Prime Minister George Rallis brought the country back into that structure last year. Simultaneously it was agreed that the US and Greek governments should negotiate revision of the agreements under which the US has access to military facilities in Greece.
These are: a superb naval anchorage, with nearby air base and missile range at Suda Bay in Crete; an electronic surveillance station at Heraklion, also in Crete; an airbase at Hellenikon, the airport complex at Athens; and a fleet communications center at Nea Makri, near Marathon.
The negotiations were suspended as the election campaign heated up, partly because Mr. Rallis did not want to be open to any charge that he was ''selling out'' to the Americans. Reportedly, the Greek side was not getting much ''give'' from the Americans on such questions as greater Greek sovereignty over the facilities and a hoped-for promise from Washington to preserve the military balance between Greece and Turkey at its present level.
There is also a persistent desire within Greece to secure some freedom of maneuver outside the NATO command to allow the deployment of Greek forces at Greek will to counter, say, any Turkish move in the Aegean.
One of the questions that incoming Prime Minister Papandreou will have to decide is whether to resume negotiations with the US for a revision of the 1953 agreement. And if so, on what basis: to secure terms compatible with Greek self-esteem or simply to squeeze the Americans out?
Papandreou can be counted on to play his cards to ensure that the military do not feel tempted to oust him. One of the ways to keep the military happy is ensure they get the weapons they want, so it is in his self-interest to keep the pipeline open to the US.
There is also room for equivocation in Mr. Papandreou's once-voiced threat to take Greece out of the EC. By the end of his election campaign, he was saying he would not do this without first consulting the Greek people in a referendum. A referendum can come only on the initiative of the president of the republic. The incumbent, Constantine Caramanlis, is a 100 percent pro-EC man and any referendum could be delayed at least until his presidency expires in May of 1985 .
Mr. Papandreou's domestic policy promises such socialist measures as nationalization of some basic industries, more planning, and import controls.