President Carter asked to be left alone during his vacation in Wyoming, and one group here has been perfectly happy to grant that request: the state's Democratic politicians.

From Gov. Ed Herschler down, Democrats here have kept a long arm's length away from the president, their party's titular head. In a tough election year, the last thing they need is for Carter's considerate unpopularity here to rub off on them.

Republicans smile at the Democrat's plight, but then Wyoming Republicans are smiling most of the time this election year. With issues ranging from coal to crime to Carter, the GOP seems primed for an unusually successful November.

The Republicans think they have a good chance to take over the at-large House seat being vacated by retiring Democrat Teno Roncalio, and to unseat Herschler. And they should easily hold the Senate seat being vacated by their own Clifford Hansen.

These prospects are reflected in the two parties' campaign for the Sept. 12 primary. The Republicans are having spirited battles for all three major nominations, while the Democratic contests seem lifeless.

The primary campaign revolves around the dominant fact of Wyoming life in the late 70s: the Boom.

Everyone in Wyoming seems acutely aware that the state, rich in energy resources, faces an unparalleled era of prosperity.

It has more coal reserves than any other state (prompting an editor to propose that the official nickname be changed from "cowboy State" to "Coal Boom State"). It ranks first or second (estimates vary) in uranium reserves, fifth in oil, seventh in natural gas.

As more and more of these resources are mined and shipped out, more and more money and people come in.

To the people of Wyoming, who are strongly attached to their clear environment and unhurried, uncluttered way of life, the boom is a mixed blessing.

That is why the Republicans have been able to turn it into a political plus. They maintain that Herschler, who is running for a second four-year term as governor, has not been sufficiently vigilant against the detriments of accelerated development.

One of the classic conditions accompanying an overnight boom is an increase in crime. Wyoming has had its share.Although the governor's personal integrity has not been questioned, his administration has been tainted by crime exposes.

When the national media began reporting on drug-running and organized crime in Rock Springs, a city at the heart of the coal field in Wyoming's southwest corner, most people here attributed the charges to sensationalism by the eastern press. But when the Rock Springs police chief was charged with murdering an undercover crime investigator, "Rock Springs" became a legitimate campaign issue.

Among those implicated in the scandal by the local press was Don Anselme, a Rock Springs businessman who was state Democratic chairman and Herschler's closest adviser. The governor has tried to put some distance between himself and Anselme, but the old friendship has tied Herschler to Rock Springs.

Herschler was scarred again when the state's attorney general, a gubernatorial appointee, was indicted for misusing the perquisites of his office.

The crime issue by itself would be enough to demoralize the Democrats. But the party has been burdened at the same time with another albatross - the Carter administration.

It seems accepted here as a fundamental truth that Jimmy Carter's policies in such areas as water development and energy pricing reflect a bias against the West. As a result, Carter's approval rating hovers around 25 percent.

Local Democrats do their best to disown the president (the governor has stayed conspicuously away during Carter's vacation in Jackson Hole), but Republicans think Carter will be one of their best issues this fall.

These factors make Herschler an underdog in his race for reelection. Two wealthy GOP businessmen, Gus Fleischli and John Ostlund, both veteran state legislators, are competing in an expensive primary for the right to challenge the incumbent. Republican polls indicate that either one should beat Herschler in November.

Democrats are in worse shape in the race for Hansen's Senate seat. For a while, it looked as if the party might have trouble finding anyone to run. Eventually three candidates - two repeated losers and a neophyte - entered the primary. Jack Whittaker, a Casper attorney and political veteran, seems likely to win the Democratic nomination.

The Republican Senate race was supposed to be a walk for Alan K. Simpson, a state legislator who carries a magic name. His father, former governor and senator Milward Simpson, is revered elder statesman.

Simpson is still favored to win, but he has run into a buzzsaw - Hugh Binford, an oil millionaire who decided last fall to seek the GOP Senate nomination.

The genial Binford, who calls himself "Bigfoot" (he wears size 14 1/2 cowboy boots), has run an energetic media campaign based on the fact that Simpson is a lawyer.

"The Bigfoot doesn't like lawyers," Binford says. "The Bigfoot doesn't trust them. Most people in Wyoming will agree with the Bigfoot on that."

The "Bigfoot" has given diversion Democrats a glimmer of hope. They had originally hoped that Roncalio, the at - large congressman, would run for the Senate. But when Roncalio mentioned casually at a football game last fall that he had decided to retire from politics at age 62, the party lost its best hope for the Senate and a safe House seat as well.

The Republicans have a tight three-way primary race for the House seat. The contestants: Dick Cheney, who came home last year after serving as White House chief of staff under Gerald Ford; Ed Witzenburger, a retired Air Force colonel who is finishing a term as state treasurer, and Jack Gage, the son of a well-known Democratic political figure.

Cheney, capitalizing on the prestige of his White House job, seemed to be leading until he suffered a mild heart attack in June. He is back on the campaign trail, but his health problem may cost him support at the polls.

The likely Democratic House nominee is Bill Bagley, a lawyer who was Roncalio's administrative assistant in Washington in the mid-1960s. Bagley is not widely known, but strong support from Roncalio could be a significant asset for him in November.