They flew in from California, Montana and Illinois last week, descending on the State Services Building in Denver with pounds of legal briefs to save the federal government money that might otherwise go to the Public Service Co. of Colorado.

In a world of increasingly arcane specialties, these three men follow one of the more obscure trades: arguing over how the people who sell electricity spread the costs among their customers. When it comes to electricity, the federal government is less a regulator than a consumer. And like other big consumers, it tries to keep state utility regulators from raising its rates.

A mundane pursuit, perhaps--except for the amount of money at stake. Between 1979 and 1980 the electric bill for the Defense Department, the government's largest electricity user, went up $116 million. The increase alone was seven times the budget of the Arms Control and Disarmament Agency and more than double that of the Consumer Product Safety Commission. In 1980, the combined electric bills of DOD and the Energy Department were about half as big as the Commerce Department's entire budget.

Only now are the calculations being done to figure the government's total electric bill; rough estimates indicate it was greater than $1.7 billion in 1980.

Which brings us back to the men flying into Denver. They were John Mathews, a San Francisco-based attorney for the General Services Administration who organizes their testimony; John W. Rettenmayer, a former University of Montana professor under contract with GSA as a utility rate expert, and David Kelly, another GSA staffer who specializes in how much return a utility should get on the money it has invested.

They are among the three dozen or so federal government employes and consultants who concentrate on utility issues. About 190 times last year, state public utility commissions held hearings on utility firms' requests to charge their customers more; in 40 of those cases, the GSA sent representatives to argue against some aspect of the rate hike. The cases include the Public Service Co. of Colorado's request for a $191.7 million increase and Pacific Gas & Electric Co.'s request for a $1.4 billion increase. If the latter is approved without change, it would be the largest rate hike in the country's history and would increase the federal government's electric bill by $11.3 million this year.

According to John W. Stanberry, who heads GSA's Office of Public Utilities, the government usually gets involved if a rate increase will cost it $1 million or more or if a particular ruling would set a precedent in rate-setting that could lead to large future increases.

There is just such an issue in the California case: put simply, whether a utility building a new generating plant can charge customers for its construction costs before the plant begins to produce electricity.

The pressure for changing long-established regulatory policy opposing this concept comes from utilities that had invested large sums in constructing new nuclear plants when interest rates ballooned and overall demand for electricity fell. More than a quarter of PG&E's proposed rate hike, about $400 million, stems from the costs of building the controversial Diablo Canyon nuclear plant.

For years, the federal government, like most consumers and regulators, dismissed the idea that utility customers should pay for an asset that did nothing for them. "Several years ago we wouldn't have considered" supporting the request, Stanberry said. "But it is becoming more and more of an issue, and we have to look at it on a case-by-case basis." In the California case, the GSA has recommended that PG&E get about 75 percent of what it's asking for on that one issue.

The fact that as big a user as the government, which has 16 major military facilities and five civilian ones in PG&E's service area, is willing to concede something on that issue could have a substantial effect on the state regulators who must resolve the question.

But the overall question of the government's effectiveness as an advocate for its own consumer interests is a matter of some debate.

The way GSA figures it, for an investment of about $400,000 in rate intervention, the government saved about $10 million in 1979. "It's hard to measure if we were responsible for a commission's decision, but if you say a rate ought to be such-and-such and that's what they decide, you can feel you had an impact," Stanberry said.

Other people familiar with utility commission procedures are more skeptical. "You know what the government people are going to say before they say it," said one attorney for an environmental group. "I've been in rate cases pretty steadily for the last five years and I'd say their effect has been zero."

"I'd say they do better than the average" intervenor, in getting their points across, said PG&E official Ray Davis. But, he added, "if the government weren't there, the result would probably be about the same."

Ray Czahar, a staff analyst for California's Public Utilities Commission, said the government's appearances and testimony do make a difference because "unless someone's there putting in their two cents' worth, they're going to get the short end of the stick."