Sweden's ruling coalition, which retained control of the Swedish government by a single parliamentary seat in last month's national election, today chose Center Party leader and environmental crusader Thorbjorn Falldin to become prime minister.

Falldin, the laconic sheep farmer who is opposed to expansion of Sweden's controversial nuclear energy program, was selected after three weeks of negotiations with his coalition partners, Ola Ullsten of the Liberal Party and Gosta Bohman of the Conservatives.

Ullsten, who had served as prime minister after Falldin resigned a year ago in a dispute over nuclear energy within the coalition, is expected to become foreign minister. Bohman, whose energetic campaign to cut Sweden's high income tax rates helped the Conservatives become the largest nonsocialist party in Sweden last month, is expected to become economy minister.

Falldin became the compromise choice for prime minister, despite his resignation a year ago and his Center Party's embarrassingly poor showing in the September election. The Center Party's representation in Parliament dropped from 86 to 64 seats. Bohman, whose Conservatives jumped from 55 to 73 seats, is considered too conservative in Swedish terms to become prime minister.

The choice of Falldin as prime minister by Sweden's barely victorious nonsocialist coalition must be ratified later this week by parliament, in which the nonsocialists control only 175 of the 349 Seats. A single absentee or rebellious member of any of the three nonsocialist parties -- which have frequently feuded since first winning power from the Social Democrats in 1976 -- could destroy the coalition.

So could a referendum in March on nuclear energy. Swedish voters must decide whether they want to keep only the six nuclear reactors now operating, or to add six more, four already completed and two to be constructed.

Falldin and his ecologically minded Center Party strongly oppose more reactors.Bohman and the Conservatives welcome nuclear energy as a replacement for some of the high-cost oil Sweden must import.Ullstem and the Liberals reluctantly agree with the Conservatives.

Until the nuclear question is resolved, it will be difficult for the coalition to decide what to do about Sweden's energy problem, which may be aggravated by a shortage of heating oil this winter, or about its economy, which only recently began to recover from the worst recession in decades.

Former prime minister Olof Palme, whose Social Democrats ruled Sweden for 44 years and built its extensive welfare state, has predicted the nonsocialist coalition will not survive the nuclear referendum and a new election will have to be held next year.

But there has been a discernible shift to the right throughout Scandinavia this year. While they have not yet given a Conservative government unchecked power and do not want to dismantle their cradle-to-grave welfare states, voters in Sweden, Norway and Finland have expressed impatience with economic problems, high taxes and other disturbing trends by voting in increasing numbers for Conservative parties.

In two weeks, voters in Denmark will be the next Scandinavians to go to the polls. Their center-left government was brought down by disagreements over economic policy.

On the day after Sweden's election, the Conservative Party in Norway made even greater gains in local elections there. If it had been a parliamentary election, the Conservatives would have easily taken control of the national government away from Norway's Social Democrats. Displeasure with high taxes was cited as one of the reasons for the Conservative's success.

A rift among Norway's Social Democrats was among another reason for their poor showing. Prime Minister Odvar Nordli this week changed half the members of his Cabinet to include representatives of dissenting wings of his party and Norway's powerful labor unions. Nordli hopes the new cabinet and plans to reform Norway's tax structure will strengthen his Social Democrats for the 1981 parliamentary elections.

In finland's national elections last March, the Conservatives also were the only major party to make significant gains, increasing their share of the 200 seats in parliament from 35 to 47. Economic problems and a feeling that the Soviet Union's influence in Finland was growing were the most important issues in the campaign.

It appears that previously middle-of-the-road voters have turned in significant numbers to relatively right-wing parties in Scandinavia out of impatience with high taxes, shaky economies, combative unions and uncertainties about energy.

Those watching the shift to the right in Scandinavia will focus on Denmark's Oct. 23 national election.