This happened to me while using two separate iTunes accounts. The app I wanted to review was downloaded from one account and my iPhone was logged into my other account.
As soon as I logged out of my current account and logged into the account I downloaded the app from, I was able to leave a review. After I wrote the review I logged back into my current account.
Thanks for the suggestion but I don't think that can have been the problem because I downloaded the app and literally a few minutes later tried to write the (positive!) review, all while logged in using the same iTunes account.
Because I have a mobileme account I do actually have a 2nd iTunes account, maybe somehow that confused things somewhere? I don't really see how though, I've never logged into iTunes with that account.