A common criticism of international law -- both existing law and potential law -- is that states have their own interests and will only comply with or form new law when it aligns with those interests. Recently, Eric Posner argued this on Foreign Policy. Putting aside his weak contention that President Obama has been as equally loathsome of international law as President G.W. Bush, Posner's main theme is that countries' interests don't align enough to make international law worthwhile.
The problem with this argument is that it is being applied selectively to international law -- it's a double standard. In domestic politics, every individual citizen has their own interests. That is a given. In representative democracies, like the United States or most any other democratic country, congresspeople or parliamentarians have very distinct interests (that may or may not represent their constituents). But scholars and commentators don't disparage democracies because various people or politicians have interests. To have interests is derived directly from having needs, and to have needs means you're alive.
So, the argument that "unaligned interests makes cooperation hopeless" is absurd. If this were true, then we ought to all give up on any form of society or government.
The primary difference between international and national law is enforcement, not interests. While in the US, for example, an individual can be arrested and convicted for murder, there are no world police (technically speaking). And mechanisms like the United Nations Security Council or the International Criminal Court are hampered by a lack of strong enforcement mechanisms. (The ICC has been struggling recently to stay above water in this respect.)
But the lack of international enforcement is a choice and, perhaps, rather natural. International law is, historically, still in its nascency. The first attempt at truly global law didn't begin until the attempts at forming the League of Nations in 1916, so in this sense, international law hasn't even hit the century mark.
Compare this to the European Union. The Treaty of Westphalia, signed in 1648, was the initial attempt at Europe's first security-based international system of law. It was a full 344 years before the European Union -- states linked by domestically enforceable law -- was formed through the Treaty of Maastricht. And even now, there is no single EU military or police force. Each state's police force within the EU must, under law, uphold EU regulations.
The world is composed of many more individuals and states, so it seems predictable that the development of an international legal system should take so long.
Ironically, Posner makes a key observation in the development of effective international law: "International law is only as strong as the states with an interest in upholding it." Precisely. America's domestic system of law is upheld, at base, because the individuals and entities in that system consent to it. Americans each have an interest in social order, lest chaos abound. Likewise, international law makes the world more efficient, predictable, and (in the long run) safer.
Given so many disparate interests, we're unlikely to see a world government in our lifetimes. But today's arguments over international law may seem laughable in 2200 -- like arguments in 1733 over a religious-refugee-founded, world-dominating union of fifty states spanning the North American continent seem today.