Both Organisations are involved in Aviation Regulation. But which of them deals with Law? Are directives given by both equally applicable to all aircraft & airline operators?
ICAO does deals with law, although not directly.
The Convention on International Civil Aviation and its 19 Annexes form the basis of International Air Law. Although the Convention text itself is not directly a law, the 193 ICAO Member States ratify the ICAO Standard and Recommended Practices, albeit sometimes with minor modifications.
From this answer:
ICAO is the International Civil Aviation Organization, a specialized agency of United Nations. It was created after the Convention on International Civil Aviation (the Chicago Convention) of 1944 was ratified in 1947. The purpose of ICAO is according to the convention:
"WHEREAS the future development of international civil aviation can greatly help to create and preserve friendship and understanding among the nations and peoples of the world, yet its abuse can become a threat to the general security; and
WHEREAS it is desirable to avoid friction and to promote that co-operation between nations and peoples upon which the peace of the world depends;
THEREFORE, the undersigned governments having agreed on certain principles and arrangements in order that international civil aviation may be developed in a safe and orderly manner and that international air transport services may be established on the basis of equality of opportunity and operated soundly and economically;
Have accordingly concluded this Convention to that end."
Within ICAO, the 191 Member States and a number of global aviation organizations work together to develop international Standards and Recommended Practices (SARPs). These SARPs are the reference for states developing their national civil aviation regulations which are legally enforcible. This is an important aspect: ICAO SARPs are not legally binding by themselves, they form the basis of national regulations which have legal status.
In this way civil aviation regulations are harmonized all over the world, with slight differences based on the actual implementation in national regulations. These local differences are then reported back to ICAO and published.
IATA is a trade organisation representing the interests of their member airlines. They don't deal with law in the sense that their directives are not embedded in law.
IATA is a trade association of airline operators (International Air Transport Association). It's main focus is to support aviation with global standards for airline safety, security, efficiency and sustainability. (IATA website)
ICAO (International Civil Aviation Organization) is an agency of the United nations. The ICAO Council adopts standards and recommended practices concerning air navigation, its infrastructure, flight inspection, prevention of unlawful interference, and facilitation of border-crossing procedures for international civil aviation. ICAO defines the protocols for air accident investigation that are followed by transport safety authorities in countries signatory to the Chicago Convention on International Civil Aviation (Wikipedia).
IATA or ICAO do not have legislative powers. The members of the organizations are commited to act according to the standards , rules or such set by the aforementioned organizations, but as such they cannot be considered to hold the authority and influence of law.
Simply put, the signatory states of ICAO have adopted ICAO standards into their own laws, rules and regulations, thus effectively making them legally binding.
If you operate a plane in an ICAO member state, you pretty much have to do it as ICAO has thought it would be best to do. If you choose not to, ICAO can't do sh... nothing about it, but your local law enforcement most likely can.