PRESIDENT REAGAN'S VISIT to Indonesia has been caught by a sudden turn in the political winds. In the months -- years, really -- of planning the visit, the mutual guiding thought was to celebrate the stability and growth achieved by Indonesia and the solidity of its ties with the United States. There is much to celebrate. President Suharto saved Indonesia from chaos and a possible communist takeover 20 years ago. He has made Indonesia a leader in development -- it now exports rice and runs a model family-planning program -- and in cooperation with its noncommunist neighbors. The United States has helped make possible this progress and has profited from it; it's hard to remember that Indonesia was once regarded as a "domino" sure to keel over in the aftermath of Vietnam.

But there is more to the story of Mr. Suharto, and much of it is cruel and ugly. To prevent a communist coup in 1965 his army savagely killed hundreds of thousands of people, mostly ethnic Chinese. The army also crushed the local liberation movement trying to succeed the Portuguese when they abandoned their colony on East Timor in 1975. The movement struggles faintly on, and its Western sympathizers have used the Reagan visit to press their very valid complaints against Mr. Suharto's strongman rule. Mr. Suharto himself gave a global advertisement to his roughneck side this week by banning Australian journalists for a story saying that his family and friends had amassed fortunes. An American journalist was also banned.

What gives these developments their edge, of course, is the broad post-Marcos sense that authoritarian as well as communist regimes should yield. The key place where this sense has been registered, at least partly, is the White House. Emboldened by his success in helping to nudge the Philippines toward democracy, President Reagan recently pledged to oppose tyranny on the right as well as the left. His announced reluctance to address President Suharto on these issues, in Bali, has drawn deserved fire at home.

Mr. Reagan went to Asia, he said, to carry a "message of freedom." He should not shrink from conveying that message in Bali on the basis of a misguided feeling that President Suharto needs no such cautions. He does.