SUNSHINE is everybody's favorite answer to the dilemmas of energy policy. Solar energy doesn't pollute the atmosphere. You can't make bombs out of it. The supply isn't declining. But since it's so attractive, why isn't it being exploited more rapidly?

The technology for heating water, and for keeping houses warm, is fully developed and commercially available. Although solar generation of electricity is not quite so far along, it's progressing nicely. But there is one drawback, and it is important. Solar energy is comparatively expensive.

The collectors - whether the little panel on your roof for the bath water, or the futuristic arrays of mirrors out in the desert - are costly. The people currently installing solar equipment are doing it as a matter of environmental principle. But the practice is not going to become widespread so long as it costs less to do the same job with oil or gas.

The present outpourings of exhortation to go solar generally touch very lightly on that point, when they touch it all. There's an illuminating little example of interest-group politics here. Most of the organizations that campaign for solar solutions are also vehement defenders of price controls on oil and natural gas. The controls hold fuel prices low, which encourages waste and undercuts the new solar technology. The greatest determinant of the use of solar energy in this country will be the relative cost of the competing fuels. Of all the things that Congress can do right now to promote solar energy, the most effective would be to deregulate gas prices.

Beyond cost, the restraints on solar power fall mostly in the category of habit and caution. Mortgage lenders are disinclined to provide loans for equipment that they regard as unconventional. It takes time to recruit and train the armies of contractors and mechanics capable of installing and fixing those systems. In some areas, housing codes get in the way. But like the price controls on oil and gas, these impediments are man-made, self-imposed and - if the country wants to do it - remediable.

According to the standard forecasts, solar energy will make only a marginal contribution to this country's needs by the end of the century. But the President's Council on Environmental Quality has just published a much more optimistic view. The CEQ argues that, by the end of this century, the sun could provide fully one-fourth of the country's energy requirements.That would be a very happy prospect, if it were possible. Unfortunately, so large a gain is not possible. The reasons can be discerned in the long quarrel, now entering its second year, over President Carter's energy bill, the central strategy of which is to end the present artificially low pricing of oil and gas. But neither is it necessary to stand still.

When all of the impediments and limitations are stated, one signal truth remains: Solar energy is the safest and most satisfactory of all sources. Under present policy, there are only three ways to meet this country's growing demand for energy. The three are, of course, imported oil, coal and nuclear fission - and the current drift of events favors the first two, which are also the most dangerous of all the possible solutions. The Carte administration has not given much leadership in behalf of the solar alternative, no doubt because the Department of Energy has been endlessly entangled in the energy bill.

What's needed now is an array of solar demonstration projects, far beyond the present modest scale, to disseminate knowledge of the equipment and to acquire broad experience with its performance and reliability. Every collector panel installed will mean a little less foreign oil coming into the country, and a little less coal smoke going into the air. That's not a bad reason to start spending money, both public and private, on solar plumbing.