I've played both. Resident Evil 4 is the superior game of the two in my opinion. RE5 added co-op to the mix, which took whatever little survival horror was left in the series and just went all action. It's still a fun game, especially if you play it with someone, but it just lacked the prowess of RE4. I loved RE4 when it came out. The story, the gameplay, the atmosphere were just all brilliantly executed. So when the teaser trailer for RE5 was revealed I got extremely excited. I waited and waited, and when it finally came out, I was pretty disappointed. The story is pretty bad, Wesker is a great bad guy, but the rest of the narrative was pretty lacking in comparison to RE4. I did have a bit of fun playing through the game with my brother, but it just lacked some crucial things to turn it from a good game to a great game.
That said, I'm a massive fan of the series, and I'm very much looking forward to RE6. Seeing as the protagonist from RE4, Leon S. Kennedy, is back, I'm very excited indeed. The two trailers released so far are promising, so I'm keeping my fingers crossed that it can be the true successor to one of my favourite games of the last generation. Here's hoping!