I never have the rest of the world hating me, thus I'm surprised by the universal hatred that many other players receieve. In my last game though, I played a slightly different way and had most of the AI civs "annoyed" or "furious" with me the whole time. From this, I believe I've figured out what keeps AI civs happy with you:
1) Trading: the more you trade, the better your relations. I trade like crazy in my games; any excess luxuries or resources normally get traded for cash. I broker techs all the time between civs. In my last game I barely traded at all, and everyone disliked me for it. If you want to improve your relations, start trading.
2) Don't kick the AI troops out of your territory. I decided I didn't want to see the AI workers and military walking through my territory, so I decided to kick them out repeatedly. Normally I just let them walk through. My relations went bad almost immediately, and after several turns of this, the other civs started declaring war. If you want good relations, you have to let the idiots wander through your territory. Or, better yet, try and sign a ROP with them to get some more money.
3) Demands: I normally cave in to AI demands simply because I like to fight wars on my terms and not theirs. They very rarely demand more than 1 turn's income anyway. In my last game, I rejected all demands. The result was that I found myself in a number of wars, and relations soured between myself and the nation demanding. If you want to stay happy with another civ, accept their demands.
Now these recommendations aren't going to appeal to many people, since they essentially amount to your civ letting the others walk all over you. But if you are playing a One City Challenge or a game on Deity where anyone can wipe you out, maybe this will help you keep happy with those other powerful civs!
