The United States is boosting diplomatic efforts to keep Australia on its side on the issue of visits by nuclear-armed or -powered ships as the New Zealand government prepares to write its controversial year-old ban into law.

At stake is the continued existence of the 31-year-old ANZUS treaty. All three member countries insist that the treaty is still viable, but for all practical purposes it has become a bilateral link between the United States and Australia, with New Zealand on the diplomatic and military sidelines.

The United States has increased the number of officials at the Williamsburg-style embassy here to 35 from 30 in the past year. The local U.S. Information Service budget has also been increased, and more senior staff has been appointed to the four U.S. consulates.

A new U.S. ambassador, Laurence W. Lane Jr., 66, a California publisher and friend of President Reagan, arrived last month. He immediately raised the American profile with a round of receptions for Australian politicians and officials and encouraged tours by U.S. members of Congress and senior officials, including FBI Director William H. Webster.

Lane's predecessor, also a friend of Reagan, had kept a low profile during his 3 1/2-year term and made little public or official impact. Unlike Lane, who has held numerous state and federal government posts, his predecessor, Robert D. Nesen, a former Cadillac dealer, had no experience in politics or diplomacy.

Last week, Lane showed how serious the United States has become about not letting Australia catch the New Zealand disease, as U.S. diplomats put it. His efforts gained front-page attention throughout Australia.

At a press conference, he said the United States could not afford to be lenient with New Zealand because of the effect it might have on other allies, such as Australia.

"New Zealand, you might say, is being punished for being a bad boy," he said, referring to Wellington's ban on U.S. nuclear warships and its plans to make it law, an act that would make it difficult for any future government to retract.

In response to the action, Washington excluded New Zealand from military maneuvers with the United States and the annual ANZUS council meetings and canceled some intelligence sharing and some educational-exchange programs.

Lane said the New Zealand government was being "brought up to speed very quickly" about the cost of impairing the ANZUS alliance.

In addition to New Zealand's actions, several other developments are causing Washington to step up its diplomatic efforts in Australia.

While Australian Prime Minister Robert Hawke firmly supports ANZUS and the U.S. position that American warships, nuclear or not, must have access to the ports of treaty partners, the influential left wing of Hawke's Labor Party, which holds a third of the seats in the House of Representatives, wants the Australian policy changed to follow New Zealand's.

In July, the Labor Party holds its biennial policy-making national conference at which the left will be making an all-out effort to force a nonnuclear ships policy on the party and the government.

The left's cause is being aided by the emergence of a strong Australian antinuclear movement, reminiscent of West Germany's Greens movement. With little organization, antinuclear groups gained more than half a million votes in the 1984 general election and managed to elect a senator to Australia's 74-member upper house.

Since then, the movement has reorganized and -- along with the equally antinuclear Australian Democrats' Party, which has seven senators -- threatens to draw more support away from Hawke's Labor Party.

In an effort to convince young antinuclear Australians that they should stay with the Labor Party, the Hawke government has just launched a year-long promotion of the International Year of Peace.