I went to see President Valery Giscard d'Estaing at the Elysee Palace the other day with a single question in mind. Had France, once the bad boy of Europe, suddenly become America's new best friend?

The answer, for the time being anyhow, seems affirmative. Adverse circumstances in Britain and Germany have worked to push France forward as the most important American ally against Soviet aggrandizement.

Leadership accounts for much of what has happened. Prime Minister Margaret Thatcher, on her visit to Washington last month, concentrated on winning approval for her economic policies by linking them to those of President Reagan. In the process, she gave evidence of a government in so much trouble at home that it could only give ground abroad.

Chancellor Helmut Schmidt I saw in Bonn in December. His normal air of confidence had given way to edginess. He protested too much about the bad impact of American interest rates on the German economy and the consequent difficulty of meeting defense targets. He wanted passionately -- even to the point of turning a blind eye on Poland -- to preserve his ties with East Germany and the Soviet Union.

Giscard, though he faces a battle for reelection six weeks hence, was totally at ease. He asked about a cartoon in the New Yorker magazine. He observed that the Weimaraner lying at his feet was none too perky. Later, his youngest daaughter, who is studying to be a vet, came to take the dog home. She presented the picture of freshness that the president will undoubtedly try to assert as a campaign theme.

Internal politics was a subject Giscard had ruled out of bounds in what he insisted should be a "conversation" rather than an interview. But his staff had expressed confidence that he would win the elections by picking up Gaullist votes between the first round on April 26 and the runoff on May 10. They also said he would reduce the Communists to a marginal figure in French politics.

France was the first subject Giscard himself discussed. He acknowledged that the country had relatively high unemployment (about 7 percent), but he asserted that there had been important reforms in protecting the poorest workers and people on pensions. He said that France, unlike many other countries, was surging forward with nuclear power. He claimed that the country, in the provinces and in Paris, was basically rich.

Thanks to its wealth, France could afford a policy that reached beyond regional issues. It maintained a growing defense force. Along with the United States and alone among the European allies, it had a truly global perspective.

In Latin America, France understood and supported the American effort to cut the flow of arms from Cuba to left-wing guerrilla forces around the Caribbean. It had repeatedly intervened to protect Western interests in Africa. France also had a presence east of Suez -- naval vesels in the Indian Ocean and ground forces in Dijibouti.

With respect to Russia, France felt it important to stay in touch. Hence a continuing correspondence between Giscard and Leonid Brezhnev, and their meeting in Warsaw last year. But France had no illusions about Soviet aims. The important point was to engage Russian in discussions that kept issues alive. A case point was Giscard's own proposal for a disarmament conference on Europe to consider confidence-building measures. It obliged the Russians to give advance notice about troop movements from Berlin all the way east to the Rals. Though the West would have to give notice of troop movements in Europe, those were virtually public anyway. President Reagan, in a telephone call, had accepted the French proposal for the United States. Brezhnev, in his speech to the 26th Party Congress, had felt obliged to go along at least part of the way. Now the proposal was the main item on the current arms control agenda.

In speaking about France's wealth, Giscard had mentioned Britian's economic plight. I asked him about West Germany.

He said he was in constant touch with Chancellor Schmidt and considered him a friend of France and a staunch ally of the United States. For the moment, though, Schmidt had troubles. The left wing of the chancellor's Social Democratic Party did not like him or his policies. It sought to embarrass him by emphasizing the popular theme of ties with East Germany and Russia. In the long run, Schmidt and the Atlantic connection would prevail. But it would take some time.

The last point seems decisive. Geography and economic power make West Germany the most valued American ally on the Continent. The tie will assert itself firmly when -- or perhaps I should say if -- the Germans sort out the periodic soul-searching that now seems to plague them again. Until then, however, the Americans' strong point in Europe is the French connection.