Like Stalker0 and tu_79 said, you need to evaluate the situation and choose who to try to be friends with and who to anger.
In early game up to about late Classical, unless you really want to play extremely peacefully, you shouldn't go out of your way to befriend anyone, really, but instead just set yourself up to have a good start into mid-game. This often means warring with your neighbors, which will make it hard to make friends with them in early game, but they will better respect and fear you in mid and late game if you start strong, so it's worth it. You may also want to try to defuse one or two of your neighbors by making them capitulate (start the war in Classical and let it drag into Medieval and then vassalize as soon as you enter Medieval); this will spare you from having to kiss too much a*s later in the game. The reason why you really want to do this early on isn't just the stronger position for you, which will make more AIs regard you as someone who is worth befriending, but also because the warmonger penalties and many diplomatic maluses will go away rather quickly and won't impact you anymore as you progress into mid-game, so it's essentially "free aggression". So in my experience it's not terribly important who you denounce at this early stage of the game.
In mid-game, however, you need to do some real thinking about global power blocks; keep in mind, though, that the transition into late game with Ideologies is still up ahead and will likely lead to some pretty substantial shifts in alliances, but for now you need to focus on mid-game. Figure out who you won't be able to avoid pis*ing off (Denmark, Mongolia and other warmongers, for example...really hard to make friends and stay friends with them) and who you don't really need to be aggressive toward in the future. Also assess who is on his way to becoming isolated (you probably don't want to ally yourself with that civ, then). Then start forging your alliances by taking care that you don't annoy the civs you wanna be friendly with and denounce the civs that your potential allies don't like, especially if they have denounced that civ as well. You need to view every possible diplomatic action, whether it be asking them for stuff, trading, espionage, war, World Council etc. as an opportunity; don't arbitrarily decide solely based on what you need right now but take into account the diplomatic impact of all your actions.
In late mid-game and late game you will likely see some major re-shifting of power blocks, because some civs will have withered to the point of irrelevance, some will have snowballed somewhat and you'll have ideologies coming into play. This is where, IMO, you should completely reevaluate your situation and not be afraid to completely restructure you diplomatic strategy. You will now know far better what Victory Condition you can realistically get, what VC the other civs may try for, where the late game strategic resources are and who needs to be stopped before they snowball out of control. I think that at this stage more "egoism" is often better than in the mid-phase. Here you should still use denouncements to suit your needs by denouncing unpopular civs to gain favor with their enemies or giving other civs an incentive to denounce someone by denouncing them first (risky), though you should obviously watch out, because the friends of the civ you denounced won't like that you denounced him.
Anyway, that's my general approach, though I'm still learning as I go. I usually play Emperor and haven't lost a game on that difficulty level (I play Epic, though) and should probably level up to Immortal but I feel that I'm having a good bit of fun and challenge every time and it doesn't really seem too easy to me.