Which organisation deals with Aviation Law - IATA or ICAO?
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:

&quot;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.&quot;

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.