Criticism of the action of a U.S. bank in freezing the assets held by Iran in Germany's giant Krupp Steel Co. spread throughout the West German government and banking community today as Bonn seemed plainly worried about its economic ties to Iran and the safety of its citizens there.

An official statement on the situation issued here today said "the government regrets the situation that has resulted. It assumes that the economic exchange between West Germany and Iran will not be adversely affected."

Perhaps more importantly, the statement stressed that "the federal government played no part at any time in these proceedings."

Privately, top government officials here say they are not so worried about the specific financial details of the legal action by New York's Morgan Guarantee Trust to freeze the 25 percent Iranian holding in Krupp's parent company.

Rather, they are worried about being able to convince the "students, masses and mullahs" that are running Iran these days that such complicated legal measures can be carried out under West German law and decided upon by German courts without any governmental role.

The New York bank this week won a preliminary decision from a court in Essen to freeze the Iranian share in Krupp to cover a $40 million share by the bank in a 1977 loan to Iran.

West Germany has some 1,600 citizens in Iran and about $300 million invested there and gets more than 10 percent of its oil from Iran. Iranian investment in West Germany is said to total close to $800 million.

In the government statement today, Bonn stressed that German courts are independent under the constitution and both creditors and debtors have the right to apply for action.

In Frankfurt, Finance Minister Hans Matthoefer said, after a meeting today of West Germany's central bank council, that he regretted the poor coordination in the Moran action. He said Bonn authorities were not informed beforehand and suggested that American government officials were also not informed "in time" about the forthcoming action.

Matthoefer said he also regretted Krupp's being drawn into a situation "which should have been talked about before in Bonn."

German officials privately have asked whether the Morgan action abroad was necessary at all since the firm's possible loan losses seemed to be covered by freezing of Iranian assets in the U.S.

Karl-Ludwig Bresser, director of the Dresdner bank, the second largest in Germany, said today it was alarming that German firms were now involved for the first time in this dispute. The bank's chairman, former economics minister Hans Friederichs, also expressed concern and called for the utmost restraint between Iran and the U.S. $ meanwhile, the outcome of the New York bank's efforts to take legal action to freeze the Iranian share in the big German engineering and construction firm of Deutsche Babcock remains unclear. The German news agency DPA reports the legal effort is apparently stymied because of a difference in the way the firm is organized.