The backers of solar energy in the United States, after years of viewing nuclear power as their principal enemy, are shifting their attack to fossil fuels.

This shift was evident during the recent annual meeting here of the American Association for the Advancement of Science, where solar power panelists reserved their strongest barbs for oil and gass instead of uranium. Solar activists used to see nuclear power as their arch enemy and chief competitor for federal research funds.

That is no longer the case. On the first day of the week-long meeting, Dr. Barry Commoner of Washington University at St. Louis -- a man devoted to the solar cause and convinced that atomic power is evil -- spent an hour at a news conference talking of the curse of oil and gasoline-burning automobiles. Commoner mentioned nuclear energy only twice in passing.

And in a weekend news conference by three outspoken solar energy advocates, scarcely a bad word about nuclear energy passed their lips. One even mentioned nuclear power in what for a solar advocate can only be described as a favorable light.

"I conclude that we shall have to be using fossil fuels in a manner that will allow us to move easily and quickly to the use of renewable fuel [like the sun's energy] and perhaps nuclear," said James McKenzie of the White House Council on Environmental Quality, long a critic of nuclear energy. "You can certainly not rule out nuclear even on the basis of Three Mile Island and the radioactive waste issue."

In a paper he gave Saturday, Denis Hayes, who organized Earth Day 10 years ago and Sun Day two years ago and is now director of the Solar Energy Research Institute in Golden, Colo., saved his most blistering criticism for coal and oil. He attacked nuclear power solely because the burning of uranimum produces plutonium that can be used to make nuclear weapons.

"The nuclear equivalent of the carbon dioxide problem in fossil fuels is the production of plutonium in reactors," Hayes said. "Moving into a plutonium economy, making use of it or simply trying to safeguard it, poses a new set of problems for the species."

Why do solar advocates appear to be moving away from attacking nuclear energy? The answer appears to lie in the fact that solar energy's primary competition for research money is no longer nuclear power but synthetic fuels -- oil and gas produced from coal, tar sands and oil shale.

The oil profits tax measure recently approved in the Senate would turn over a little less than $20 billion in the next 10 years to the development of synthetic fuels and roughly $13 billion to the development of solar energy. The Senate debate on the tax issue began with a proposal to distribute as much as $88 billion to synthetic fuel production and no more than $2 billion to solar energy.

"Most people think solar got the shaft from the windfall profits tax distribution," Hayes said at a news conference today, "but I expect the total expenditures on solar in the next 10 years will be substantially greater than expenditures on synfuels. I think solar did all right at the windfall profits thing."