Princeton, N.J. — When Freeman Dyson was a teen-ager and Hitler's war machine was beginning to bristle, the young Briton believed strongly that the pacifism practiced by Mohandas Gandhi could prevent another world war.
Within a few short years, however, he was playing a key advisory role to the Royal Air Force and its campaign of saturation bombing. Then he enthusiastically applied his expertise as a physicist to the development of atomic weapons. As a close associate of J. Robert Oppenheimer, Edward Teller, Hans Bethe, and other well-known figures, he became immersed in the sometimes frightening and always controversial world of nuclear strategy and its tools of mass destruction.
Today, his unique background and considerable experience in the worlds of both ''warrior'' and ''victim,'' as he calls them, have led Freeman Dyson to look for a way out of the ''morally repugnant and politically sterile'' concepts underlying today's superpower standoff. Perhaps most important, his message is intended to bridge the great and potentially dangerous gap between those who must plan for nuclear war and an increasingly disturbed public.
It is not a role the slight, dark-haired professor accepts with much enthusiasm. His editor at Harper & Row had to browbeat him into writing a book he would rather have lingered over for five years. Since ''Weapons and Hope'' was published earlier this year, he has been swamped with requests for speeches, interviews, even sermons. He accepts some, but begs off on as many as possible.
In his book-filled corner office at the Institute for Advanced Study here, where he has worked for the past 31 years, Professor Dyson talks about recent developments in public perception and political action which have made his thoughtful and provocative book so relevant.
As it turned out, his editor's instincts could not have been better. Dyson's writing deadline was just a few days after President Reagan's controversial ''star wars'' speech last year, in which the President advocated new research on ways to defend against nuclear attack and ultimately render such warheads ''impotent and obsolete.''
Dyson's analysis of nuclear weapons and strategic defense does not conform to current assertions of the Defense Department's opponents among arms control advocates. Perhaps this is not surprising, coming from an award-winning physicist whose father, Sir George Dyson, was a well-known British composer, whose mother, Lady Mildred, was a lawyer, and whose son designs oceangoing kayaks and writes poetry at his home on an island off the coast of Alaska.
Dyson says he likes the notion of moving from offensive to defensive systems, particularly if (as Mr. Reagan acknowledged) this is done within the context of reduced nuclear arsenals. Dyson has worked for the Arms Control and Disarmament Agency in the past, but he says he now finds that ''professional arms controllers are very antagonistic'' to his ideas.
''They think I am more or less a traitor to the cause because I am for strategic defenses,'' he says.
Yet Dyson also says he believes that the administration's new push for a technological solution to what is essentially an ethical and political problem is far too heavily weighted on the side of space-based systems and unproved hardware. And he says he believes the MX intercontinental ballistic missile is a perfect example of the ''technical folly'' of relying on ''mutual assured destruction'' (MAD) as the basis of deterrence.
''The thing that scares the Russians very much is the idea that we can beat them to death with technology. And so much of it is presented to the public as just that,'' he says. ''It should be one of the ground rules that you only do things that the Soviet Union will be happy to follow and do things with technology that is more or less accessible to both sides.''
What this means, he says, is less-threatening ground-based missile defenses - coupled with space-based sensors - that do not violate the Anti-Ballistic Missile Treaty of 1972. And for this reason, he adds, the United States ought to quietly proceed with the Army's ballistic missile defense program, which has been in existence for years.
In any case, he argues, what must come first is a reconciliation of the basically incompatible US and Soviet concepts of how nuclear war could start and be fought. The US bases its planning on MAD; the Soviets base theirs on the option of a preemptive strike and survival under any circumstances. Without this fundamental reexamination, Dyson says, the best the world can expect is less-than-perfect arms control agreements, such as the SALT treaties, which permit a nuclear buildup.
Dyson says he is looking for something better than MAD, limited nuclear war-fighting, or unilateral disarmament. What he settles on is a middle way that includes a mutually agreeable reduction in nuclear weapons and a shift toward defensive systems, although not of the ''star wars'' variety.
Some critics say this could ''make the world safe for conventional war.'' That may be true, Dyson acknowledges, but adds that it cannot be proved and the alternative could be much worse.
''The basic issue before us is simple,'' he asserts. ''Are we, or are we not, ready to face the uncertainties of a world in which nuclear weapons have been negotiated all the way down to zero?''
The key, he says, is to stop focusing on numbers and hardware and instead face more directly the moral and then the political issues accompanying the quest for a safer world. That is a job for all of us, he stresses, but especially for scientists and military leaders, who must deal most closely with today's increasingly accurate and powerful weapons of mass destruction.
Dyson acknowledges, based on his own experience on earlier atomic-weapons projects, that this will not be easy. As he wrote in an earlier book titled ''Disturbing the Universe,'' ''nuclear explosives have a glitter more seductive than gold to those who play with them.'' And his thesis may be particularly troubling to the scientific and military establishment, whose basis for expertise is the ability to quantify and predict with assurance. More important, says Dyson, are the fundamental values that are difficult to quantify.
Yet, based on his years of experience in both the theory and practice of nuclear arms, he says he believes that a shift in emphasis in arms control from technical to ethical considerations is possible. And he says he feels that this might well begin with the military. He notes that NATO's commander, Gen. Bernard Rogers, has been urging the alliance to reduce its reliance on a ''nuclear crutch'' of thousands of tactical nuclear weapons.
''It is conceivable that the military establishment will itself decide that a shift to a nonnuclear strategy is required, in order to restore honor and self-respect to the ancient profession of soldiering,'' he writes. ''If our leading soldiers were to become convinced, as most of the great soldiers of the past were convinced, that high morale and a sense of purpose are more essential ingredients of military strength than big bombs, then a shift of United States strategy to nonnuclear resistance is by no means inconceivable.''
Professor Dyson says he feels a bit like the apostle Paul, who remained a tentmaker while he preached the early Christian gospel. Dyson says he wants to get back to ''earning an honest living'' teaching some of the world's most promising young scientists in this quiet academic setting, where everyone gathers for tea and cookies at 3 p.m.
''For me, making tents is doing physics,'' he says. ''I really need that to stay intellectually honest.''