The United States agreed yesterday to allow the Soviet Union to make the biggest grain purchase in history.

The Soviets can buy up to 25 million metric tons of wheat and corn during the next 12 months, about 10 percent of what the United States is expected to produce this year. A metric ton is 2,200 pounds.

Officials at the Department of Agriculture said the sales, which had been widely expected by grain traders, will not have a significant effect on prices.

But the U.S. action comes at a time when the Carter administration is promoting new initiatives to combat food prices. Grain prices are much higher than a year ago, partly because of the anticipated Soviet sale, and, now that it is approved, prices probably will not fall, according to farm experts.

In 1972, the Soviets secretly bought 18 million metric tons of wheat and corn, some of which was sold at prices subsidized by the U.S. government. That controversial sale, which led to major food price increases in the United States, resulted in an agreement under which Washington must give prior approval to purchases of more than 8 million tons in one year.

The approval came just three days after President Carter's televised address to the nation concerning the latest tension between the United States and the Soviet Union, the "combat brigade" of the Soviets in Cuba.

The agreement announced yesterday does not rule out purchases beyond the 25-million-ton figure, but added sales would require another approval.

Under Secretary of Agriculture Dale Hathaway, who headed the U.S. delegation in the talks here, said the situation now is totally unlike that in 1972.

"Our supply availability is such that the purchases would not have a significant effect on prices because we have a farmer reserve program and record crops," Hathaway said, adding, "and we are not paying them to take it."

The Soviet Union, which already has bought the first 8 million tons allowed under the agreement, needs to import up to 32 million tons of grain in the coming year because poor weather has damaged its crop.

Agriculture officials estimate that the Soviet crop will be about 180 million tons, at least 40 million below target.

In addition, part of the U.S. grain could end up in Vietnam and Cambodia.Despite the prospects of its own poor harvest, the Soviets have shipped tons of grain to Vietnam to support their ally and are reported to be supplying grain to the Vietnamese-backed regime in Cambodia to alleviate famine there.

This year's U.S. wheat crop is about 57.8 million metric tons, or 2.12 billion bushels, up 18 percent from last year and the second-largest crop ever. The Agriculture Department recently announced that farmers would be eligible for all wheat price-support programs even if they divert no land from production. A 10 percent set aside was required during the past year.

The corn crop now being harvested is expected to be a record 185 million tons, or 7.27 billion bushels. That is about 3 percent higher than last year's crop which was a record.

In the marketing year ended last month, the Soviets bought about 15.7 million tons. The year before, they bought 14.6 million tons. Each year, they bought about 3 times as much corn as wheat, since they use corn primarily for livestock feed.

The one unexpected element in the new agreement is that the Soviets can buy any mix of wheat and corn they choose. Since corn is cheaper at the moment, the additional purchases might be largely corn, a development that could anger U.S. wheat growers.

Hathaway said that even if the Soviets buy the full 25 million tons, supplies will be adequate to meet domestic demand and other export requirements and still maintain sufficient carryover into the 1980-81 season.

Corn prices at U.S. farms averaged about $2.50 a bushel last month. USDA estimates that they will average between $2.40 and $2.70 during the next 12 months.