I only played Civ IV BTS and Civ V. I find it really hard to choose between the two.
On one hand, Civ IV have really nice diplomacy and a usually good AI. Religion was a selling point for me, combined with the Civics, your relation with other civs was really fun. The Diplomatic Victory was my favorite by far, I remember making alliances with strong "cultural" civs such as Isabella, spreading our religion to other civs and then trying to maintain good relations with them so I get elected at the UN. I've sink SOOO many hours in this game.
On the other hand, now that I played Civ V, I find Civ IV's square-based tiles and stacking units to be totally retarded. Combat in Civ V is so much fun, much better than Civ IV. You can take advantage of the terrain, and depending on how the other civs build their cities, invading them can be really tricky. I tried to go back to Civ IV the other day, and I just couldn't make myself play more than a couple of turns, I find Civ V progression so engaging. Also, the city states system can be really fun, when used well. I've sink around 100 hours and I'll probably sink many more when Gods and Kings comes out.
But, of course, Civ V's AI and Diplomacy are a joke. Diplomacy Victory has turned into Economic Victory, you just need to bribe the City States with gold, no need to do many of their "quests". The AI is truly bipolar, and is really impossible to maintain good relations with them, because basically they also are "playing to win", in Civ IV they acted more as their respective avatars, and if you make friends with them, they will help you out on winning the game. In Civ V, if they see that you're gaining strength, they will declare war on you no matter how friendly they appear.
So... Yeah... Civ IV is probably the "better" game, but I find it really hard to enjoy it anymore.
Let's just hope the new expansion fix some of Civ V's issues.