The western states, whipsawed by the financial crisis in Mexico to the south and by the collapse of the housing-dependent lumber industry to the north, enter 1983 with their economies in the most fragile condition since World War II.

While there is a general expectation of a very modest recovery this year, it is by no means unanimous. The prospects for improvement hang on tenuous threads, including continued congressional support of major weapons systems, a revived housing market, significant drops in interest rates and the willingness of state politicians to reduce mounting deficits.

In Oregon, Washington and Idaho, analysts predict either a slight upturn from some of the worst years since the Great Depression or at least an end to the decline. Nevada, which has a seemingly recession-proof, gambling-based economy, has over the past year begun to experience some of the deterioration characteristic of the rest of the country.

In California, the mainstay of the western states, there are the following developments and prospects:

The Reagan administration's defense spending buildup is now starting to take effect in the assembly lines and hiring halls of the major aerospace contractors. Because of the collapse of the civilian airplane market, the aerospace industry had seen a steady decline in employment in 1982 until Pentagon contracts resulted in new hiring in the last part of the year.

This growth, however, is now threatened by congressional doubts about a centerpiece of the weapons acquisition program, the MX missile. Other potential targets of congressional budget cutters include the B1 bomber and the F18 aircraft, major parts of which are built in California.

The financial crisis in Mexico is hurting California's tourist industry and is resulting in an increased flow of dollars out of California into Mexico. Not only are fewer Mexican tourists coming to California (and Nevada, where gambling revenues are down sharply), but the devalued peso has made Mexico far more competitive with California for American and European tourists looking for a reasonably priced vacation. Compounding the problem is the increased pressure on Mexicans working in California to send more money back to beleaguered families.

The housing and lumber industries are expected to grow, but the improvement is likely to be weaker than in much of the rest of the nation.

For one thing, California has a disproportionately large share of the existing housing inventory, meaning that the pressure for new construction will be less than in the remainder of the country. Second, the housing market will be cramped by the fact that homes in California cost 80 percent more than the national average, making a home purchase impossible for many people who could buy elsewhere.

In addition, the maximum mortgage that can be resold easily through the Federal Home Loan Mortgage Corp. is $107,000, which is too small for much of the California market.

California has lost three of its five automobile manufacturing plants in the past four years and is scheduled to lose a fourth. Confidence is not strong that the remaining facility, a General Motors assembly plant in Van Nuys, will remain open.

Despite these and other troubling elements in the analysis of the state's economy--including a continued reduction in state and local government employment resulting from Proposition 13 and the prospect of a new Republican governor deadlocked with a Democratic legislature over a deficit well in excess of $1 billion--there is some anticipation of improvement in 1983.

After listing the difficulties facing the state, the Business Forecasting Project at the University of California, Los Angeles, recently declared, "We are, nevertheless, optimistic that an economic recovery will start soon, perhaps in the first or second quarter of 1983."

Not to be caught too far out on a limb, the forecasters added, "We hope."

David Shulman, of the project, cautioned that the favorable prediction is based on the expectation of a sharper decline in interest rates than most economists are anticipating.

Ted D. Gibson, vice president and senior economist for the Crocker Bank in San Francisco, said economic projections depend on whether "you see the cup half full or half empty," adding that California may have a mild recovery in 1983, but it will follow the state's worst year in recent memory.

"There are a few glimmers of sunlight on California's dark horizon," Gibson said. "Interest rates have fallen to the point that talk of a sustained recovery in home building and consumer durable spending represents something more than wishful thinking. The rise in defense outlays is finally offsetting the pronounced weakness in commercial aircraft orders . . . the dramatic reduction in the rate of inflation, coupled with federal and state tax cuts, is allowing the first increases in real after-tax wages since 1976."

If economists are cautiously optimistic in California, to the north they are significantly more anxious about the prospects for recovery.

The new year will "not be much different" from 1982, Chang M. Sohn, Oregon's state economist, said. The recovery, if it materializes, "will be very, very mild."

In a report issued last month, Oregon officials declared that "the optimism in the national economic forecast does not extend to Oregon in the same degree. Oregon has little to gain from a recovery led by consumption and defense spending."

Oregon, which is heavily dependent on the lumber industry, has been hurt more than most states during the past two years. In the recession, Oregon lost 108,000 jobs, a decline of 10.1 percent, compared with a 1.9 percent loss for the country as a whole, and 3.7 and 7.4 percent declines for neighboring Washington and Idaho, respectively.

"The Oregon economy remains mired in its worst decline since the 1930s," according to the state's own assessment. Ray M. Broughton, vice president and chief economist for the First Interstate Bank of Oregon, pointed out that 1982 marked the first time since World War II that the state's population dropped.

"The decline this year compares with a nearly 26 percent population increase during the decade of the 1970s," Broughton said.

Despite the near-depression level of the state's economy, Broughton contends that "1983 appears, at long last, to be Oregon's turnaround year." He said that the increased demand for new housing will result in 4,000 new jobs in lumber and wood products, that tourism will continue to grow, that wholesale and retail trade will provide moderate gains and that the state's highly diversified agricultural sector should see some increase in profits.

Washington, which shares with Oregon a strong dependency on the lumber industry, is also the headquarters of the nation's largest producer of civilian aircraft, Boeing. With the worldwide market in civilian airplanes in a depression, the company expects a continued decline in employment in 1983.

From a high of 80,000 workers in July 1980, Boeing ended 1982 with about 66,900. In 1983, it expects to lay off just under 9,000 more employes in the Puget Sound area, dropping the work force to about 58,000.

In Idaho, the state's chief economist, Richard A. Slaughter, described economic prospects as "flat, we don't look for any kind of rapid turnaround."

Over the past three years, the state's employment level has dropped by 29,000 jobs, or 8.7 percent, a significant proportion of which was caused by the closure of major mining facilities, including the Bunker Hill Mine and Smelter.

State projections anticipate improvements in 1983, although they are seen running slightly behind national averages. For example, per capita income is expected to grow 1.6 percent this year in the country as a whole, but only 0.6 percent in Idaho.

In Nevada, the recession and the Mexican financial crisis have taken their toll. Casinos anticipating annual growth rates approaching 20 percent saw revenues rise only one-third that much in 1982.

High-rolling gamblers from Mexico have been hurt badly by the devaluation of the peso, and competition from Atlantic City, N.J., has reduced the number of gamblers going to Nevada from the East Coast. If there is a modest recovery, Nevada may regain some of its growth, but is not likely to rebound to recent highs for at least two years.

Hawaii officials expect the first half of the year to be flat, largely because of a lull in the office and condominium industry, but anticipate considerable expansion in the second half. Despite the recession, tourism, Hawaii's most important industry, grew by 8 percent last year and is expected to continue growing this year. The Reagan military buildup increased revenues from defense facilities by 20 percent, and this expansion is also expected to continue. The two main crops, sugar and pineapples, however, face an international surplus.

Alaska has seen falling oil prices reduce state revenues from oil from about $4 billion to an anticipated $2.8 billion this year. In addition, the dependence of the state's fish and timber industries on exports to Japan and Europe have been hurt by weak foreign economies and a strong dollar pushing up the prices of American goods. Despite these problems, the general economy continues to benefit from the large investments made by oil companies, particularly in the Anchorage area, where extensive construction and exploration is under way.