FOR THE FIRST TIME in nearly a generation last March this country produced more coal than oil. It's partly due to the steady decline in domestic oil, of course, but it's also partly the rising rate at which coal is being mined. That trend is running in President Carter's direction, since his energy program prescribes a massive expansion of coal mining.But a swing back to coal, as the principal fuel for the American economy, is going to be anything but simple.

High coal production in March followed two months of low production, for the mining and shipping of coal is severely affected by cold weather. Gas and oil flow through pipelines that are very little affected by the temperature. Both the administration and Congress are currently thinking hard about legislation to build slurry pipelines that carry pulverized coal mixed with water. But the cost of the slurry lines, in both money and water, would be formidable. The alternative is the long and slow job of strengthening the railroad system.

Congress is also wrestling with the revisions to the Clean Air Act, and one of the hardest decisions in it is the standard for coal-burning power plants. In terms of health protection there's a very strong case for sticking with the rigorous Senate bill rather than taking the weaker House version. But it's also fair to say that the Senate bill's requirements will make it harder for the electric utilities to follow the Carter energy plan. The debate focuses attention on the implications of rapid and sustained increases in coal consumption. Our own guess is that, as the country thinks more about the effects of burning coal on the public health, the nuclear reactors are going to look a little more attractive.

Another kind of concern arises from the chaos within the United Mine Workers. The results of the union's elections last month are now under challenge from one of the losers, promising an indefinite paralysis at the top. Among the miners, the epidemic of wildcat strikes continues. The outburst of wildcat striking over the past several years has hurt the revenues of the miners' medical care and retirement funds to a point at which the benefits are being cut back - inciting further wildcat strikes. Beyond that, it seems very likely that the whole union will go out in December when the present contract expires.

Fire wood provided more than half of this country's energy - more than coal, oil and gas together - into early 1890s. Coal then became dominant and provided most of the country's energy through World Warr II. The next great step, to oil and gas, came with great speed. Coal now provides less than one-fifth of the country's energy while oil and gas provide three-quarters of it. They were cheaper to produce than coal, easier to transport and much cleaner to burn. But now the costs and risks of relying on oil have shot upward drastically. Clearly, coal consumption is going to have to keep rising. But it's very much an open question whether it can rise - or ought to rise - as fast as the Carter plan proposes.