I’m thinking that humanity won’t be that unified without some universal danger that transcends our cultural barriers. While it’s possible to get a relatively small group like a nation to coexist peacefully, that’s largely because there are survival benefits to overlooking minor differences.
But as the differences grow, it becomes harder and harder for people to see the benefits outweighing the difficulties of reaping them. At a certain point, cultures generally balk as they see the reforms necessary for that sort of unity as a threat to their cultural identity.
Right now, we have fifty small nations making up a federation called the United States and it takes a major tragedy to get all fifty very similar cultures to put a pause to the squabbling and act as one nation. With that being the case, one might imagine how much more it would take to unite even the most progressive of Muslim states with the Western world due to the vastly larger differences between the two cultures compared to the difference between a Texan and a Vermonter.
Natural disasters seem to work for a short while, but for lasting effect it would have to be at least a hundred times larger than anything we’ve seen yet. We’re talking a tidal wave that hits all the way inland to Las Vegas or a Force 9 hurricane/typhoon that just kills everyone in an area of many thousands of square miles. The sort of disaster I don’t see as being possible outside of a Hollywood blockbuster.
It is possible that an alien invasion that puts the whole of humanity on the defensive equally could do the trick, but that has it’s own problems, not the least of which being the odds of it happening.
Of course, there is one other way that unity could happen. See, much tension is the result of a scarcity of resources. For instance, we want oil from the Middle East, but the people who live there have a few objections to foreigners coming in and stealing their land and resources. And you can’t blame them; you’d probably be a little pissed if your neighbor wanted to chop down a tree in your yard, and possibly get a little violent if they just barged right into your yard and started sawing away. But if we lived in a post-scarcity world of abundant resources for all, we wouldn’t need their oil, they wouldn’t need our money, and your neighbor wouldn’t need to chop down the trees in your yard.
When we have universal access to enough energy, food, water, and physical space, then we’ll likely see no reason to fight each other, though the concerns over loss of cultural identity will take many generations after that to achieve something like the Star Trek Federation which has things like matter replicators and anti-matter reactors that brought about a post-scarcity economy.