The Senate voted yesterday to cut Social Security and other federal retirement programs by nearly $8 billion next year in what could be a turn-around point in Social Security's costly history.

Voting 49 to 42, the Senate accepted a proposal of its Budget Committee to save $7.9 billion by reducing the automatic cost of living increases that 45 million retirees receive each year to help them keep pace with inflation.

But, if the House accepts the proposal, which is not guaranteed, Congress could substitute other economies that the Reagan administration now says it will shortly propose in Social Security and related retirement programs.

In any case, the vote, reversing a stand taken by the Senate only a month ago, marks the first time either house of Congress has voted a major cutback in Social Security, which has always been one of the political untouchables when it come to budget cutting.

During last year's campaign, Ronald Reagan had also included Social Security in the list of basic "safety net" programs that he would not disturb in his economic retrenchment drive. But administration officials told Congress Thursday they were preparing proposals for large, as yet unspecified cuts because of concern for the system's solvency as well as fear of rising deficits.

The Social Security vote came as the Senate made its way through a second day of action on the preliminary budget for fiscal 1982, defeating efforts by liberals and conservatives alike to tamper with a $699.1 billion draft proposed by its Budget Committee.

Rejected were proposals to increase veterans benefits at the expense of other health programs, to provide more money for school lunches and pick up some savings from government travel, public relations and debt collections. On Thursday, however, the Senate reaffirmed its earlier decision to keep alive the Legal Services Corp., which the administration wants to kill.

Except for the retirement program savings, the budget now making its way through the Republican-controlled Senate differs little from the version approved Thursday by the Democratic-run House in a dramatic victory for President Reagan and his budget-cutting crusade. Senate approval of the budget is expected by the middle of next week.

When the Senate Budget Committee proposed cutting back cost-of-living increases for retirement programs, thereby achieving its goal of a reduced budget deficit, it did so over the objections of the Reagan administration. The Senate's action to keep the proposed savings serves to increase pressure on the administration to come up with workable alternatives for cutting down on retirement costs, unless it wants to swallow the cost-of-living change.

Sen. Ernest F. Hollings (D-S.C.) said yesterday he doubted that the administration can come up with suitable alternatives. "They'll have a difficult time making those cuts," said Hollings, predicting that Reagan will probably make changes in the cost-of-living formula for pensions by administrative action if Congress doesn't do it for him.

The Budget Committee's proposal, drafted by Hollings, would make two basic changes:

Starting July 1, cost-of-living increases, which are currently pegged to the consumer price index, would be based on average wage increases for the previous year if wages increased less than prices. Over the past year, wages rose slightly less than prices.

Starting in calendar 1982, payment of increases would be delayed from July 1 to Oct. 1.

Together, these changes would save $7.9 billion in fiscal 1982 and comparable amounts for the future. They would affect 36 million Social Security recipients and 9 million civilian government, military and railroad retirees.

The House-approved budget proposes no such changes, although some influential members have said they might fight for them if the administration was willing to lead the charge.

The fight in the Senate to prevent the changes was led by Donald W. Riegle Jr. (D-Mich.), who argued that they would mean a "sweeping change" and "broken promises" to 45 million elderly citizens. They would tell the elderly that "just to save some money . . . we're going to take this out of your hide," complained Sen. Lawton Chiles (D-Fla.). "They cannot afford the essential services to keep body and soul together," roared Sen. Edward M. Kennedy (D-Mass.).

"Taking it out of their hides -- that's political garbage," retorted Hollings, contending that the country desperately needs to control spending.

On the vote, most Democrats voted against the cut, while most Republicans supported it. Exceptions to this pattern were Democrats Hollings, Walter D. Huddleston (Ky.), J. Bennett Johnston (La.), Sam Nunn (Ga.), David L. Boren (Okla.) and John C. Stennis (Miss.) and Republicans Paula Hawkins (Fla.), John Heinz (Pa.), Nancy Landon Kassebaum (Kans.), John H. Chafee (R.I.) and Arlen Specter (Pa.).

Among Washington area senators, John W. Warner (R-Va.) voted for the cut, while Harry F. Byrd Jr. (Ind.-Va.) and Paul S. Sarbanes (D-Md.) voted against it. Sen. Charles McC. Mathias (R-Md.) did not vote on the issue.

Although the Senate Budget Committee recommended that the $7.9 billion in savings come from the cost-of-living increases, budget resolutions are not binding, meaning that the Finance Committee could find the savings from any programs within the income security section of the budget. This means the committee could adopt the administration's recommendations when they're made or even come up with ideas of its own. Normally, but not always, the committees follow Budget Committee recommendations.

After the vote, Laurie Fiori, a legislative representative of the 12.5 million member American Association of Retired Persons, said she was "dismayed" and added: "This is one vital area of the Social Security program that cannot be cut. The elderly are extremely vulnerable to inflation. The Senate apparently doesn't recognize that."