British Prime Minister Margaret Thatcher reshuffled her Cabinet tonight in an apparent attempt to increase its loyalty to her and improve her government's image-making.

She replaced both her leader of the House of Commons and her information chiefs, who had primary responsibilities for winning support for the government's policies in Parliament and the country. Their posts were combined and given to Francis Pym, who as defense secretary had tangled with Thatcher's treasury ministers over cuts in the defense budget.

Pym was replaced at Defense by one of Thatcher's staunchest Cabinet supporters, John Nott, who was trade secretary and now will have a more senior Cabinet position. His job at Trade goes to another strong supporter of Thatcher's economic policies, John Biffen, who moves up from number two in the Treasury. Still another Thatcher loyalist, Leon Brittain, now in the Home Office, is being promoted to Biffen's old job. A number of junior ministers also were moved.

It was still unclear tonight just what the changes mean for the Defense Ministry. Besides quarreling about cuts forced by the Treasury in planned defense spending and reportedly threatening to resign at one point, Pym has presided over controversial policy decisions.

He has been the government's point man in public debate over the costly decision to modernize Britain's independent Polaris submarine nuclear deterrent with new American Trident submarines and missiles and over Britain's plans to deploy at U.S.-run NATO bases here the cruise missile as part of the modernization of NATO's medium-range nuclear weapons in Europe.

Pym also launched a formal study of whether Britain should develop chemical weapons, a capability it gave up after the horrors of poison gas warfare in World War I.

The Defense Ministry also is faced with the serious problem of how to pay for Trident and other expensive new weapons systems, warplanes and ships while maintaining British troops on NATO duty in West Germany and Britain's NATO responsibilities for defense of allied supply lines across the Atlantic. Speculation has been increasing here that Britain might have to abandon or scale down at least one of those commitments.

Because Pym is being moved to another important, if possibly less senior, Cabinet post that will keep him on the public firing line defending Thatcher's policies, it could not be determined tonight whether his move reflects any displeasure with him at Defense. A spokesman for Thatcher said only that the Cabinet changes did not mean any change in her government's policies.

The meaning of the replacement of Norman St. John-Stevas as leader of the House of Commons and Angus Maude as paymaster general and government information chief was clearer. Thatcher has been concerned about a dramatic upsurge of discontent with her harsh economic policies, both on her own Conservative backbenchers in Parliament and across the country as reflected in public opinion polls and her own staff's soundings.

Maude, 68, a veteran politician and former journalist, has been blamed by Conservative Party activists, despite his unswerving loyalty to Thatcher, for failing "to get the government's message across." Thatcher herself has become impatient with the media's preoccupation with evidence that she is failing so far to improve Britain's battered economy.

St. John-Stevas, a bitingly witty, sometimes arrogant, patrician intellectual has made his dissent from Thatcher's harshest monetary policies public in thinly veiled speeches about Conservative Party philosophy. He warned that the party was in danger of being seen as "hard-faced" and "callous" and deviating from its past social and moral leadership.

St. John-Stevas also was reportedly regarded by Thatcher and her lieutenants as a weak leader of Parliament.

Thatcher has strengthened the monetarist mettle of her own staff by hiring as an economic adviser Alan Walters, 54, a British monetarist economist who teaches at John Hopkins University in Baltimore and is a consultant to the World Bank in Washington. Because his tax-free World Bank salary has given him a very comfortable life style in the United States, Thatcher had to pay him the equivalent of about $120,000, some of it from Conservative Party funds, to entice him to the prime minister's office.

Thatcher herself, in traditional turn-of-the-year interviews on British radio and television last week, again repeated her determination to see her policies through, despite a number of tactical changes.