The opposition Labor Party's crushing defeat last week in what should have been a routine parliamentary by-election victory has sent shock waves through British politics, raising the possibility once again of a fundamental realignment of the country's main parties.

In one of the biggest by-election voting shifts since World War II, the people of Bermondsey in South London overwhelmingly chose the candidate of the new Liberal-Social Democratic alliance over the Labor candidate. Bermondsey had been solidly Labor for 60 years and was reckoned one of the party's safest seats.

"The Labor Party is in terminal decline," proclaimed David Steel, leader of the Liberals, rejoicing at the alliance's best news in months. "We are now the effective opposition."

Then Monday, one of the country's leading pollsters, Market and Opinion Research International, reported that in a national sample of voters after Bermondsey, the alliance showed up substantially stronger than Labor and only a few percentage points behind the ruling Conservatives. Whereas only a few weeks ago, the fledgling alliance appeared to be struggling, now it was Labor--and particularly its 69-year-old leader Michael Foot--that the pundits said was in serious trouble.

"I am not thinking of resigning," Foot told interviewers while weekend newspapers quoted anonymous party faithful as saying he might well be persuaded to do so if Labor loses a seat it now holds in another by-election scheduled for March 24.

What gives events of recent days added significance is the widespread belief that a national election may be called soon. Margaret Thatcher's term as prime minister does not run out until May 1984. Although she has said repeatedly that her preference is to go the full distance, the odds now are that she might move to hold a national election sooner, perhaps as early as June; more likely in October.

A combination of economic and political factors are behind the betting that the Conservatives will go for an early vote. Politically, the consensus is still that Thatcher and her Conservatives, buoyed by the reputation she earned as a tough-minded leader during last spring's Falklands War, will be returned to power with a substantial plurality. Given that in politics, as the old axiom goes and the past seven days have demonstrated anew, a week is a long time, Thatcher's advisers believe she should exploit her advantage sooner rather than later.

Moreover, a country-wide redistricting has just been completed that is likely to mean an additional 15 to 20 seats for the Tories, reflecting a population move away from Labor's traditional strongholds in the inner cities. And even if Foot survives as Labor's chief until the election, Labor's position will have been weakened by the widely publicized criticisms of his leadership, which one television commentator summarized to his face Monday as "indecisive and vacillating." One of the party's main reasons for keeping him, experts agree, is that a succession fight would make matters worse. (Should Foot resign voluntarily, he would be succeeded at least initially by his deputy, Denis Healey.)

Another political factor is the still unknown potential of the centrist alliance, made up of the traditionally third place Liberals and Social Democrats, a party established in 1981 by defectors from Labor who believed their party had become too leftist. From the Conservatives' perspective, the longer an election is delayed, the more time the alliance has to make gains such as it did in Bermondsey and establish itself as a credible alternative for government.

After a fast start when it was founded, the Social Democrats' backing appeared to slump despite its link to the Liberals. If the latest poll findings hold up, however, the alliance's standing is again improving, largely at Labor's expense.

On the economic front, Thatcher's primary reason for calling an early election would be to take advantage of her biggest accomplishment on that score--a cut in Britain's inflation rate from over 10 percent to about 5. But the figure may begin inching up again later this year because the value of the pound sterling has dropped 12 percent since November to just over $1.50.

Even if the pound now stabilizes, the higher cost of imports will start to have an impact on inflation soon. While Britain's overall exports should benefit from the cheaper pound, the price of oil is sliding, and this will hit projected revenues from North Sea output.

The Confederation of British Industry said today that manufacturers are now more optimistic than at any time since 1979, when economic activity was near its last peak. Unemployment, however, is unlikely to fall in the near future and may even continue to rise slightly next fall. Therefore, Thatcher appears to have little to gain by waiting for an easing recession to reduce jobless figures.

"Pressure is undoubtedly increasing for a June election," said one of Thatcher's closest advisers, who previously had dismissed any speculation about dates for the contest. But he insisted that the prime minister has still not made up her mind.