Yale changed his life. And West German President Karl Carstens is touring the United States for 10 days in part to say thank you. In the New World beginning Monday, he will meet with President Reagan, gaze at the Grand Canyon, celebrate the 300th anniversary of the emigration of those Germans whose descendants are now the largest ethnic group in the US - and generally pour oil on the sometimes troubled waters of American-German relations. The grand finale of his goodwill tour will be his speech at Yale Law School, however. It was here in 1948-49 that he learned to admire the political and personal spontaneity of the Americans who had so recently defeated his own country in war.
Mr. Carstens, then a 33-year-old lawyer with military service and passive Nazi Party membership just behind him, initially signed up for courses in contract and admiralty law. But his adviser quickly steered him away from those specialties toward such broad subjects as constitutional and international law.
Those studies had a lasting impact on a man whose years in Nazi Germany had soured his taste for the public application of law.
The impact was intensified by the endless political discussions he had with his new American friends. ''We talked day and night,'' he recalled in an interview in the century-old presidential villa on the Rhine. ''They were all politically engaged, and they said what they wanted to change. So I met a group of people who identified themselves with their country and the problems of their country - something I had never done, and most young Germans of that time had not done.''
It was a revelation to a young man whose own bitter experience had led him and his surviving friends to renounce politics. On returning home with a Masters of Law degree, Carstens accepted an appointment as representative of his native Bremen to the new federal seat in Bonn. ''I am absolutely sure that without the experience in America I would have turned down that offer and would have stuck to my conviction that it was better not to get involved in politics,'' Carstens said.
After that decision, he never looked back. His career branched out to include diplomatic service and a professorship in law at the University of Cologne. When he entered the Bundestag in 1972, he quickly became the conservative party's parliamentary leader, representing its right wing in the often abrasive manner for which he would become known.
In part because of this, Carstens' 1979 candidacy for the nonpartisan, largely ceremonial presidency aroused much controversy. Social Democrats who had clashed with him doubted that he could unite all Germans, as the president is supposed to do. They also attacked him for having bent with the winds in joining the Nazi Party in the early 1940s.
Nevertheless, Carstens was elected by the presidential convention, and during his four years in office the controversy has evaporated. Carstens has indeed stayed above politics in his speeches.
Moreover, Carstens has endeared himself to tens of thousands of citizens by fulfilling a pledge to hike the length of West Germany.
In two years of weekends, he walked from the Baltic Sea to the Bavarian Alps, chatting with local hikers and making a special point of including handicapped people in the outings.
This week, President Carstens' goodwill appearances are going farther afield as he tours a half dozen American cities.
Part of his mission will be to reawaken ethnic pride in a group that has generally been so well assimilated as to quit thinking of itself as ethnic.
But the President will also be telling a lot of Texans and New Yorkers that the sometimes anti-American protesters they will see on television news programs this fall in antinuclear demonstrations represent only a ''very small minority'' of West Germans.
The ''vast majority'' he'll be saying, love and appreciate America - just as he does.