I'd have to say that I prefer the first Pirates movie out of the two. When I saw it in the theatre, I found that it did a good job in the beginning of the movie of creating setting, mood, and atmosphere, which I don't often find in other movies. It was one of those where you seem to lose track that you're sitting in a movie theatre.
Number 2 was good as well, but it seemed like it was just going through the motions. Kinda of like they were just trying to throw in there anything pirate-y that the writers came up with. Not that the movie was bad though. It just didn't have the same oomph as much as the first one. I liked the character of Davy Jones, that was an interesting bad guy to create.