In a resounding victory for President Reagan, the House of Representatives yesterday voted 239 to 186 to release $625 million for basing studies and test flights of the controversial MX missile.

Though it rarely defies presidents on major weapons questions, Congress had held up the MX money last year because of doubts that Reagan had a workable plan for deploying the MX. The president responded by naming a bipartisan commission to help him devise a new plan.

The vote yesterday was a clear endorsement of the commission's recommendations to go ahead with 100 of the big 10-warhead MXs for now, put them in existing Minuteman silos, but look in the future at possible development of smaller and mobile single-warhead missiles instead.

Reagan achieved his unexpectedly easy victory in part by lobbying in traditional ways but also by pledging to alter the U.S. negotiating position in the strategic arms reduction talks in geneva in several ways sought by moderates of both parties in congress.

The Senate is expected also to release the MX funds in a vote today. In a test vote yesterday, it declined by 59 to 35 to put the issue off.

Only 18 House Republicans deserted Reagan, and 148 voted in favor of the MX funds yesterday. By contrast, last July the administration lost 45 Republicans on an MX test vote.

There were fewer switches among the Democrats, but those who did switch were crucial in producing yesterday's result and were sharply denounced by other Democrats who stood firm. Democrats voted 168 to 91 against the MX yesterday. Last July they split 164 to 70.

In a statement, Reagan thanked members of both parties who he said took "a wise, courageous step forward for America" by voting for the measure. He said the vote "sends an important signal to the world: Americans are uniting in a common search to protect our security, reduce the level of nuclear weapons and strengthen the peace."

"We now look to the Senate to send this same message," he said.

Congress had held up the spending of the money last December after rejecting "Dense Pack," Reagan's plan to bunch the 100 MXs together on the theory that the first incoming missile in any attack would blow up those following.

The December House vote, when the issue was at least as much Dense Pack as MX, was 245 to 176 against the missile. An earlier July vote, in some ways a more accurate test of House sentiment on the missile, was 212 to 209 in favor.

The bipartisan commission that Reagan named after the December vote has headed by retired Lt. Gen. Brent Scowcroft, former national security affairs adviser in the Nixon-Ford years. Its recommendation that the United States look in the future to smaller mobile missiles met favor with members who want arms control and see the MX as destabilizing.

The commission also moved to reassert the traditional bipartisanship of Congress on national security questions by working closely with Democrats, particularly on the arms control side of its recommendations.

The president then agreed to alter his arms control position to conform to the Scowcroft recommendations and in addition to explore the "build-down" idea, in which more atomic warheads would be destroyed than deployed.

The president's pledges won over influential Demoncrats who had previously opposed the $30 billion MX program, in particular Reps. Albert Gore Jr. (Tenn.), Les Aspin (Wis.) and Norman D. Dicks (Wash.). There switches produced a bitter split among liberal and moderate Democrats and, more than any other factor, swung yesterday's vote for the administration, both sides said.

"The work that was done by Norm Dicks, Gore, Aspin and some others who put together a dialogue with the administration showed the moderates that there was a legitimate place to go in this debate," said Rep. Jack Edwards (R-Ala.), one leader of the fight for the missile.

The defection of the one-time Democratic opponents infuriated their anti-MX colleagues.

"I'm amazed at the Democrats who have entered into a bargain with the administration," said Rep. Les AuCoin (D-Ore.) "The president gets the MX and Congress gets a statement of sincerity about arms control. If that's a bargain, I say to my colleagues, I'm pleased they're not negotiating with the Soviet Union."

Rep. Joseph P. Addabbo (D-N.Y.), wildly waving the resolution in the air, implored his colleagues not to believe that they were voting for an arms control package. "There is no package in this resolution," he shouted. "Don't kid yourselves . . . . Here we are five months later ready to reverse ourselves . . . . This is a license to procure the MX and put it into fixed silos."

Rep. Bill Frenzel (Minn.), a moderate Republican who voted twice against the MX last year, dined with Reagan and 50 other House members Monday night as the president, over curried soup and roast veal, talked up the missile. It was Frenzel's third visit to the White House in recent weeks.

But it was less the president who influenced him, he said, than the group of Democrats who switched and then heavily lobbied their colleagues. "One of the most influential guys on me was Les Aspin," Frenzel said. "When you have hawks and doves together, that seems to be the beginning of an honest bipartisan arms control policy."

Gore, who voted against the MX last year, said in an interview that he and other congressional Democrats are now involved in the formulation of the administration's new arms negotiation position in Geneva.

That position, to be unveiled in early June, would sharply reduce the ratio of warheads to silos, thus limiting the first-strike capability of both sides, he said.

"Many members are surprised with the bargain we made with the White House," Gore said. "But we have a number of opportunities to vote on the MX in the authorization and appropriations bills. We can turn it down if the administration is not living up to its end of the bargain. They know we hold a lot of cards."

While proponents argued that the MX is needed so the United States can bargain more strongly in Geneva, Rep. Byron L. Dorgan (D-N.D.) said, "Those of us from the prairies know the difference between a bargaining chip and a cow chip."

Two Maryland Democrats, Reps. Beverly D. Byron and Steny H. Hoyer, were among those who switched from opposing MX procurement funds last year to favoring the new MX proposal in yesterday's vote. Rep. Michael D. Barnes (D) voted against the release of the funds, while Virginia Republicans Stan Parris and Frank Wolf voted for it.

The Democratic split was reflected in the leadership. House Majority Leader james C. Wright Jr. (Tex.) and Majority Whip Thomas S. Foley (Wash.) voted for the MX funds, while House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) opposed them.

"This could be a temporary victory for the president," O'Neill said. Other votes on MX authorizing and appropriations bills will give members "an opportunity to vote on both sides of the issue," he said.