A controversial Virginia power plant, which switched from burning coal to oil almost seven years ago, is expected to be ordered to convert back to coal as part of the Carter administration's energy program, according to federal officials.

The Virginia Electric and Power Co.'s Yorktown plant - a target a recent energy battles - was converted from coal to oil under a 1972 state court order, following widespread complaints and criminal charges that the plant had caused severe air pollution.

"I don't care if Jimmy Carter requires them to burn peanuts in the Yorktown plant if it doesn't pollute," said Robert F. Ripley, York County commonwealth attorney. Ripley led the 1972 effort against Vepco. "But it has to be something that I'm convinced is going to be effective (in preventing pollution)."

In a similar move, Energy Department officials say they are preparing to step up stalled efforts to switch the oil-burning Charles P. Crane generating plant, east of Baltimore, back to coal. The Baltimore Gas and Electric Co. favors the switch, but Baltimore County officials have challenged it, arguing that it will increase air pollution and restrict industrial growth.

These new plans, disclosed in interviews with Energy Department officials, illustrate the environmental dilemma that confronts the nation as the Carter administration seeks to reduce U.S. reliance on costly oil and other petroleum products and increase use of cheaper and more abundant coal.

For many electric utility companies, the nation's energy and environmental policies have resulted in a costly and disconcerting zigzag. During the late 1960s and early 1970s, power plants - including the Yorktown and Crane generating stations - were converted from coal to oil to cut costs and curb air pollution. Now, many utilities are being told to switch back.

Charles A. Falcone, director of existing facilities conversion for the Energy Department, said in a telephone interview that the nation could save about 310,000 barrels of oil a day - close to 2 percent of current U.S. consumption - by converting many electric power plants from oil to coal during the next five to six years. Under pending congressional legislation, designed to speed conversions savings of 166,000 barrels-a-day would be possible in the next two years, Falcone said.

The Yorktown plant is expected to be among the first to receive new Energy Department coal-burning orders, officials said. "We're going to issue a draft prohibition order [banning use of oil at the plant]," Falcone said. "It's our definite plan and we plan to do it in the next month." He also described the Crane plant as "a good candidate" for reconversion to coal.

The Energy Department is now beginning to carry out coal-conversion provisions of national energy legislation signed by President Carter last November. The Fuel Use Act, that allows the Energy Department to order power plants to switch from oil to coal, became effective May 8, but, officials say, regulations for enforcing the new law were only recently drafted.

In the mid-1970s the federal government attempted to order some utilities - including the Yorktown and Crane plants - to shift back to coal under a program carried out by the old Federal Energy Administration, now part of DOE. But these efforts were criticized as ineffective. Energy officials say the new legislation gives them stronger enforcement powers.

The current plans for ordering fuel switches at the Yorktown and Crane generating stations appear to be the most controversial of several plans currently under consideration by federal officials in Virginia and Maryland. Officials said they are considering ordering conversions to coal at several other Vepco and Baltimore Gas plants. None of the Potomac Electric Power Co.'s plants were described as immediate targets for coal conversion.

At issue at the Yorktown generating station are two of the plant's three oil burning units. They were converted from coal to oil after Vepco signed a state court consent order. In return, criminal charges that air pollution from the plant constituted a public nuisance were dropped.

Asked about the Energy Department's plans to require the two units to shift back to coal a Vepco spokesman said, "Our position is to comply with the [court] order.I don't see where we have any other choice." Both energy department officials and Ripley suggested, however, that the court order could be modified to permit use of coal, under strict antipollution safeguards.

Vepco spent about $3 million to convert the two generation units from coal to oil, according to news accounts at the time. The Vepco spokesman said yesterday he was unable to confirm the figure.

Although the Vepco spokesman declined to estimate how much it would cost to reconvert the two units, he said a Vepco study of conversion costs at another plant might provide some indication.The study showed that total costs for switching one unit similar to those at Yorktown was about $7.5 million. The shift, nonetheless, would result in a fuel saving of nearly $5 million a year, he said.

A Baltimore Gas & Electric Co. spokesman said the Crane plant's two units in eastern Baltimore County had been converted to oil burning in 1970 and 1972 at a cost of $6.2 million. Switching back to coal, the spokesman said, is expected to cost $50 million to $60 million. The company expects to cut fuel costs markedly by making the change, the spokesman noted, but he had no estimate of the fuel savings.

Baltimore County Executive Donald P. Hutchinson has objected to the Crane plant's conversion, saying that it would increase sulfur dioxide pollution and "prevent all but very limited [industrial] growth in the area" because of federal Clean Air Act restrictions.

Federal officials say they are also considering ordering conversions from oil to coal at several other Virginia and Maryland plants. These include Vepco generating units at the Chester-field plant south of Richmond and plants at Portsmouth and Possum Point in Prince William County. Baltimore Gas units under study by federal officials include the Herbert A. Wagner plant and the partly constructed Brandon Shores generating station both in Anna Arundel County.