The European allies and Japan have sent separate messages to Iranian President Abol Hassan Bani-Sadr, urging him to do everything he can to bring about the release of the hostages held at the U.S. Embassy in Tehran and avoid harsh retaliatory action by the Carter administration.

Carter's reported intention to revive imposition of economic sanctions against Iran appears to have little support among Washington's major allies, however.

British sources characterized the messages as "telling Bani-Sadr the facts of life as we see them, no more and no less." The messages contained "no threats, implicit or explicit" that the nine Common Market nations or Japan might join the United States in imposing economic sanctions against Iran if progress were not made to solve the crisis, according to sources here.

The similar but not identical letters from the head of the state of the Commom Market countries were transmitted through their embassies in Tehran at the end of last week, apparently just after President Carter sent Bani-Sadr two messages also seeking a solution to the hostage crisis and warning of tough new U.S. measures if progress was not made soon. Spokesmen for the British, West German and Dutch governments said today the United States did not ask the other nations to send messages, although they had been in touch with Washington and each other to discuss the matter.

A source said British Prime Minister Margaret Thatcher's government decided along with the others "to get in touch with Bani-Sadr and lay it on the line" that the Carter administration had become frustrated by the failure of several attempts to negotiate the hostages' release. The British message noted that the United States has been very patient up to now, but that its patience was not infinite and it would be in Iran's best interests for Bani-Sadr to move quickly to find a solution.

British officials remain opposed to economic sanctions, in part because they believe they could not legally impose them on British banks and businesses without a United Nations order. Such an order was vetoed in the U.N. Security Council by the Soviet Union in mid-January.

After the failure to obtain a U.N. order, the European allies stubbornly resisted intense pressure from the Carter administration to join the United States in imposing economic sanctions against Iran. Britain, France and West Germany finally convinced Carter to delay imposing sanctions until further attempts to negotiate the hostages' release were made through the United Nations and other channels.

British officials realize that the failure of those negotiations and the Bani-Sadr government's inability to gain control of the hostages have frustrated the Carter administration and have forced it to become more active in its efforts to free the hostages. Officials here fear this will lead to another round of pressure on the European allies to impose economic sanctions.

This also would renew the strain on the Atlantic alliance created by the refusal of the European allies to completely support Carter's tough response to the Soviet invasion of Afghanistan and by their earlier disagreement over imposing sanctions on Iran. In this case, even Britain, which has been the most dependable U.S. supporter on Afghanistan, would drag its feet.

British government officials are not alone in their opposition to economic sanctions.British bankers oppose sanctions because of the damage they could do to the international banking industry here. The bankers fear that if anything were done to affect their large Iranian deposits and loans, it would hurt them financially and scare away other oil-rich Middle Eastern countries who are among the banks' most important customers.

Bankers in West Germany are in a similar situation. But West German Chancellor Helmut Schmidt reluctantly decided to support U.S. economic sanctions anyway in January, only to discover shortly afterwards that Carter had shelved the idea without informing Bonn.

Officials of several European governments also fear that retaliatory measures against Iran might exacerbate the internal power struggle that has made it so difficult to solve the hostage crisis. They prefer application of diplomatic pressure through the message sent last week or expressions of international disapproval such as the suggestion of the Common Market countries' ambassadors that their embassies in Tehran be closed until the hostages are released.