A federal appellate court yesterday struck down the Consumer Product Safety Commission's controversial one-year-old ban on insulation made with formaldehyde.

A three-judge panel of the U.S. Court of Appeals for the Fifth Circuit said the federal safety commission had failed to produce "the substantial evidence necessary" to support its national ban of urea-formaldehyde foam, commonly called UF-foam.

The commission had banned UF-foam on Feb. 23, 1982, ruling that this was the only way to protect consumers from the formaldehyde gas frequently released after the insulation is installed.

At the time, the safety commission said UF-foam posed a significant health threat to consumers because formaldehyde had been shown to cause cancer in animals and had been linked to numerous health problems in humans, including nausea, headaches, dizziness, respiratory ailments, bloody noses, and eye and skin irritations.

Formaldehyde manufacturers claimed the ban was unjustified by medical or scientific findings.

"We are not unmindful that regulating in the face of scientific uncertainty, within ever-tightening budget constraints, presents the Consumer Product Safety Commission with a difficult task," the appellate judges in New Orleans, La., said in their unanimous court ruling yesterday. Such problems, however, do not lessen the safety panel's responsiblity to make sure its rules are "supported by substanial evidence," the judges said, adding that such "evidence is lacking here."

The appellate court also said the safety commission had acted under the wrong federal statute when it extended its ban on formaldehyde to insulation in public schools.

The court's decision took the safety panel and Justice Department by surprise. Officials for both the agency and the department refused comment yesterday, saying they hadn't yet read the court's decision, nor decided whether it will be appealed.

A spokesman for formaldehyde manufacturers, however, said the court ruling had vindicated the industry. Attorneys for UF-foam makers had argued that their clients' product did not pose any significant health dangers to consumers and that the safety commission had "persecuted the industry and made irresponsible scientific interpretations."

David Greenberg, legislative director of the Consumer Federation of America, protested the court's decision yesterday. "The evidence of health hazards is very strong," Greenberg said. "A decision like this takes risks with the health of Americans."

As many as half a million homes have been insulated with formaldehyde foam since the mid-1970s, folowing a massive government campaign to convince homeowners to conserve energy. In 1981, sales of formaldehyde foam totaled about $10 million.

The safety commission's 4-to-1 decision to ban future sales of formaldehyde was considered a highly unusual step for the commission under the leadership of Chairman Nancy Harvey Steorts, a Reagan appointee who frequently has voiced strong opposition to mandatory standards and bans, preferring voluntary industry programs instead. Two other federal agenices also had refused to declare formaldehyde unsafe.

At the time, Steorts said she had concluded that there was no voluntary solution to the problem of formaldehyde gas except to ban UF-foam. That decision came five months after the Environmental Protection Agency staff recommended against priority regulation of formaldehyde as a cancer-causing agent, saying that current studies imply no "significant risk" of serious harm to exposed humans. The Occupational Safety and Health Administration also refused to issue an emergency warning about exposure to formaldehyde.

Unlike other types of insulation that are made at factories and then installed in houses, UF-foam is prepared at the site where it is to be installed.

UF-foam resembles shaving cream when it is pumped into spaces between walls. It then hardens, forming a layer of insulation. Such insulation had been especially popular among owners of older homes because it could be installed easily through relatively small holes in walls.

Since the foam insulation became popular in the mid-1970s, the commission has received 2,200 complaints, involving some 5,700 people, about adverse health effects.

After concerns about UF-foam became public, the industry experienced a sharp decline, from 170,000 installations at its peak in 1977 to 8,320 installations in 1981. The number of manufacturers of the insulation has declined from 16 to 3, and the number of installers has decreased from 1,500 to 200.