The Supreme Court ruled yesterday that workers may refuse tasks they consider unsafe without suffering retaliation from their employer.

The court unanimously upheld a federal job safety regulation, vigorously challenged by industry, which allows such refusal when there is a "real danger" of death or serious injury and not enough time for a worker to go through ordinary channels od complaint.

Under the ruling, an employer can deny wages for the unworked time. But he cannot fire, reprimand or otherwise "discriminate" against an employe who in good faith declines to work, citing unsafe conditions.

The case originated at a Whirlpool Corp. appliance plant in Marion, Ohio, where a worker fell to his death in June 1974 through a metal screen 20 feet about the floor.

The screen was designed to catch appliance parts that occasionally fell from a conveyor belt above it. Periodically, maintenance workers had to scale it and walk along it to clear off the fallen parts.

Virgil Deemer and Thomas Cornwell had complained about the condition of the screen just weeks before their co-worker fell through it and died. After the death, they filed a complaint with the Occupational Safety and Health Administration and refused their foreman's order to continue working on it.

The two men were formally reprimanded for the insubordination and deprived of six hours' pay for the time they did not work.

OSHA and the men cahllenged the action, citing an OSHA regulation giving them the right to decline work in a hazardous circumstance. Whirlpool challenged the regulation in the courts, claiming that it went beyond the lay setting up the federal agency.

Yesterday, Justice Potter Stewart, writing for the unanimous court, held that the regulation was a valid one, which conformed with the law and the purposes of the law -- to protect workers.

It would contradict the act's purposes, the court said, to deprive "an employe, with no other reasonable alternative, the freedom to withdraw from a workplace environment that he reasonably believe is highly dangerous."

It is especially necessary "since OSHA inspectors cannot be present around the clock in every workplace."

Employers are protected from abuse of the regulation by still having the right to challenge in court an employe's good faith and by seeking his discharge or reprimand, the justices said in the case of Whirlpool vs. the Secretary of Labor.

In another decision yesterday, the court ruled that an illegitimate child of a dead federal worker cannot be denied survivor's benefits just because the child did not live with the worker at the time of death.

That case -- U.S. vs. Clark -- stemmed from the death of a civil servant who fathered two children out of wedlock. He lived with the children for four years before separating from the mother.

Had he died while residing with the children, there would have been no problem under the Civil Service Retirement Act. Because this was not so, the act denied benefits to the children after his death.

The court ruled yesterday that, in denying the benefits, the act had been too narrowly interpreted.