For the second time this year, the West German government has relaxed restrictions against exporting arms outside the North Atlantic Treaty Organization and a small group of other countries.

The Bonn Cabinet decided last night that to approve credit guarantees for the sale of a modern submarine to Argentina which is under military rule. The order is worth $153 million to West Germany's hardpressed shipbuilding industry.

In February, Bonn provided similar approval for two submarine sales to Indonesia.

In general, the West Germans have stuck to their policy of not exporting weapons to what they call "areas of tension" and some sales have been turned down despite heavy pressure from the defense industry, some conservative newspapers and politicians, labor leaders and even some government officials.

Almost two years ago, for example, Bonn rejected a Saudi Arabian order for armored cars that would have been worth $600 million.

The Germans for the most part have limited their sales to NATO allies, Japan, Australia and New Zealand, as well as neutral Sweden and Switzerland.

Government spokesmen acknowledged that both submarine sales have been "exceptions" to this policy. The sale to Argentina, they said, was undertaken with "considerable reservations." The decisive factor, they said, was the serious unemployment situation in the North Sea yards at Emden, where the 10 per cent unemployment rate is double the national average. The submarine is to provide about was years' work there.

The Bonn government has argued generally that giving in to widespeard world demand for German-built weapons will create foreign policy problems and an expanded arms industry vulnerable to quick collapse in other times.

Others argue that the Germans are giving up a market unnecessarily to the United States, France, Britain and the Soviet Union since countries determined to buy weapons will find them.

The African nation Somalia, which gave permission to Bonn to land a commando team in October to storm a Hijacked Lufthansa airlines, is also believed to be pressing for weapons.

Publicy, however, the West Germans insist that this is not so and tht their offer to some $15 million in aid is limited to dam and irrigation projects and techncal assistance.