An unlikely alliance of conservative and liberal members of Congress, of divorced women, widows, housewives and feminists, has produced what is probably the most significant piece of legislation benefiting women to come out of the 97th Congress. With unexpected speed, Congress has approved a measure that allows military retirement benefits to be divided by state courts in divorce settlements, thereby nullifying last summer's controversial Supreme Court ruling that the pay belonged only to the spouse who served.

In so doing, Congress has corrected a situation that has left thousands of former military spouses in jeopardy and taken yet another step toward economic recognition of the contributions homemakers make to marriages.

"Credit has to rest right in the lap of Pat Schroeder (D-Col.)," says Patricia Reuss, legislative director of the Women's Equity Action League. "Six years ago, she talked about pensions for military, Foreign Service and civil service wives and people thought: That's a nice feminist thing to do, but don't expect anything to happen."

Both military and Foreign Service spouses argue that because of frequent moves a wife generally cannot establish an independent career that would qualify her for a pension. The wives also argue that marriage is an economic partnership in which they shoulder the family responsibilities and make social contributions that are beneficial to their husbands' careers.

Two years ago, Schroeder sponsored precedent-setting legislation that allowed state courts to split Foreign Service pensions. She introduced a similar bill for military spouses in the House, and was joined in the Senate by Roger Jepsen, an Iowa Republican who is chairman of the Senate Armed Forces subcommittee on manpower and personnel.

Jepsen's wife, Dee -- President Reagan's newly appointed coordinator for women's issues -- met with WEAL, the National Association of Military Wives, and Ex-Partners of Servicemen for Equality and was highly influential in involving her husband in the military spouses legislation. Other key supporters included Rep. Kent Hance (D-Tex.), in whose state military spouses have been unable to garnish paychecks for delinquent alimony and child support, and William Whitehurst (R. Va.), who has been interested for several years in relieving the plight of former military spouses who had serious illnesses and have been unable to get insurance after divorce.

The bill, which President Reagan is expected to sign today, came out of the legislative process providing more to military spouses than its most optimistic supporters could have hoped for. Key provisions are:

Military retirement can be considered property to be divided in divorce cases no matter how short a time the military marriage lasted. There is a provision for state courts to reopen pension issues in divorce settlements occuring after last summer's McCarty v. McCarty decision and before the signing of this legislation.

Garnishment of military retirement paychecks is limited to situations in which the ex-spouse was married at least 10 years while the member was in the service. Child support and alimony can be garnished without the 10-year requirement. Payments do not terminate upon remarriage.

Payments cannot be more than 50 percent of the military member's retirement or retainer pay.

Service members, including those already divorced, may elect to have their former spouses designated as beneficiaries of their Survivor's Benefit Plan. If a service member terminates his wife as a beneficiary of survivor's benefits, the service secretary has to notify her.

Former military spouses who were married at least 20 years during the member's service now have access to military health facilities and commissaries, although these terminate upon remarriage. This legislation will not take effect until Feb. 1, 1983. Carolyn Becraft, who has analyzed the legislation for WEAL, stresses that it is particularly important for spouses who have been married to military personnel for 20 years or more to wait until Feb. 1 before their divorces become final, to be eligible for medical, commissary and military exchange provisions.

Homemakers have been courted by the left and the right and their economic perils have been the subject of windy political rhetoric. In a climate widely seen as bleak for women, there has finally been a breath of fresh air. Instead of merely talking about the value of wives and mothers, Congress has voted to recognize women's unpaid contributions to marriage and has taken an important step forward in protecting the future of America's homemakers.