The U.S. Court of Appeals ruled yesterday that President Carter acted lawfully when he began to charge federal employes for their previously free government parking spaces.

As a result, the Reagan administration said it would begin considering whether to reimpose the controversial parking fee program, which it estimates could generate $40 million a year in revenue.

Federal employe unions said immediately they would lobby against resumption of the parking fee plan, which could force some of the 75,000 car-driving federal workers here to pay up to $90 a month to park. Kenneth T. Blaylock, president of the American Federation of Government Employees (AFGE), which challenged the parking fees in court, said that restarting the program "would represent another unsympathetic slap in the face to the people who work for the U.S. government."

National Treasury Employees Union (NTEU) president Vincent L. Connery said the ruling was "certainly just another one in a series of blows to federal employes. What else can one say?"

The 3-to-0 appellate court decision reversed a ruling last March by U.S. District Judge Harold H. Greene, who said the program, started in November 1979, was illegal because it had not been approved by Congress. Greene blocked further collection of the fees and later ordered the government to refund an estimated $20 million already paid by more than 275,000 federal workers nationwide.

The government took the case to the appeals court, but at the same time began to make plans to refund the money in case Greene's decision was upheld. Federal workers who paid the fees submitted more than $14 million in refund claims.

In its decision yesterday overturning Greene's ruling, the appeals court said the president had the legal authority to impose the program, without the approval of Congress, under a law that provides for economical use of government property.

That not only means there will be no refunds -- which could have meant $250 to $500 for some employes -- but also raises the possibility that the government could try to collect the fees owed since last March when the program was stopped. One official estimated the uncollected back fees would total another $15 million.

However, Appeals Judge Ruth Bader Ginsburg, writing for the court yesterday, commented in a footnote that the government had not asked the court to allow for collection of back fees, although it reserved its right to do so. Without deciding the question, Ginsburg noted that such restitution is not automatic and has been denied by other courts "where the justice of the case does not call for it."

Carter's parking-fee program was challenged in the courts by AFGE, which was joined by NTEU. AFGE general counsel James R. Rosa said no decision has been made about asking the full 11-member appeals court to review yesterday's decision by the panel that included Chief Judge Spottswood W. Robinson III, Judge Roger Robb and Ginsburg.

Royce C. Lamberth, chief of the civil division of the U.S. attorney's office here, said the Reagan administration "plans to review as a policy matter whether it will resume collection of the fees." Lamberth's office represented the General Services Administration, which implemented the parking-fee program for the Carter administration.

When the program began in November 1979, employes who had parked for free were required to pay half the commercial rates in the localities where they worked -- from $12 to $45 a month in the Washington area. By this past October, the employes would have been required to pay the full commercial rate.

Carter aides had warned that the end of free parking could have "adverse effects on the morale of federal workers," some of whom later picketed the White House and petitioned against the fee program.

The employe unions, meanwhile, went to federal court. They argued that Carter's contention that the fee program would save energy by encouraging use of car pools and public transportation placed the program under the 1975 Energy Policy and Conservation Act.

That act says Congress can consider short-term energy conservation programs proposed by the president. Since Carter did not seek congressional approval of the parking-fee program, the unions contended he acted illegally when he ordered its implementation. Greene agreed and stopped collection of the fees.

The Court of Appeals, however, agreed with the government that the president had the authority to charge for parking under the Federal Property and Administrative Services Act, which allows the chief executive to take action for the economical and efficient use of government property. The appeals court said it was "inescapably obvious" that the parking fee program, which would generate millions of dollars in revenue, fits squarely within the language of that law.

The unions admitted the president could impose parking fees under some portion of that law, but they insisted that Carter's specific action came under the Energy Policy Act because his intent was so plainly related to saving energy and not to use of government property.

The appeals court, however, rejected the notion that all presidential acts designed to save energy must be implemented under the Energy Policy Act. The judges concluded that the law was not intended by Congress to diminish authority already invested in the president through other laws such as the Federal Property Act.