The Supreme Court ruled yesterday that the government does not have to publish an "environmental impact statement" to inform people of hazards when it chooses sites for nuclear weapons storage.

The court said such disclosure could reveal military secrets and jeopardize national security.

The unanimous decision reversed an appellate court ruling that had required the Navy to publish a limited, "hypothetical" environmental impact statement when it was contemplating building a nuclear storage facility.

Environmental and antinuclear organizations brought suit in Hawaii, demanding the statement to warn residents of the potential effects of storing weapons there.

The Navy never acknowledged its storage plans for an area just one mile from a major flight path to Honolulu International Airport and contended that requiring an environmental assessment would make it do so, bringing classified information out in public.

The National Environmental Policy Act requires impact statements for major federal projects that could have a substantial impact on their surroundings.

Justice William H. Rehnquist, writing for the court, said that under that law, the Navy, too, "must consider environmental consequences in its decision-making process." It may even have to prepare a formal environmental impact statement when it plans to build a storage facility, he said.

But any such statement can be exclusively for consumption within the government. It does not have to be made public, like most other environmental impact statements, because the Freedom of Information Acts exempts such information from mandatory public disclosure.

" . . . It is clear that Congress intended that the public's interest in ensuring that federal agencies comply with the National Environmental Policy Act must give way to the government's need to preserve military secrets . . . . Whether or not nuclear weapons are stored in Hawaii is classified information exempt from disclosure to the public," he said.

Justices Harry A. Blackmun and William J. Brennan agreed with the result in Weinberger vs. Catholic Action of Hawaii but gave different reasons.

The Navy must prepare impact statements, they said. But they should not be exempted automatically from public disclosure. The government should decide on a case-by-case basis whether disclosure of all or part of the information is practical, they said.

The court issued another environmental ruling yesterday in the first opinion written by Justice Sandra Day O'Connor.

O'Connor, joined by all the other justices, rejected efforts to force a change in the government's system for awarding offshore oil leases. The system had been challenged by the Energy Action Educational Foundation on grounds that it discouraged competition from small drilling companies.

It did this, the group argued, by requiring large amounts of cash from companies bidding for drilling rights, amounts small companies might not be able to raise.

The Court of Appeals for the District of Columbia ruled with the foundation, holding that 1978 amendments to the Outer Continental Shelf Lands Act required the Interior Department to experiment with a variety of bidding systems as urged by the activists.

O'Connor disagreed. The law, she said in Watt vs. Energy Action Educational Foundation gives the interior secretary broad discretion in the choice of bidding systems. He must answer to Congress, not the courts, for ignoring any congressionally mandated bidding variations, she said.

Traditionally, a new justice gets to choose the first opinion he or she writes and traditionally, the other justices try hard to agree with it. From then on, however, all opinions are assigned by the chief justice, if he is in the majority, or, if he is not, by the senior justice who is.