For the longest time I wondered how to tell what was getting my work rejected. I had a sneaking suspicion it was my query letter, but no way to know for sure. After 3 versions of the query for one novel and fifteen rejections from agents, I decided to rework the query again. I sent out another round of the newest incarnation of the query (personalized for each agent, of course) and the two I've heard back from have been requests for chapters. I think it was definitely my query killing my chances. If I knew what worked and what didn't for query letters, I'd definitely share it here. All I know is that keeping your plot summary exciting and succinct, trimming all excess from the letter, and being professional worked for me. Of course, all of that is subjective. I thought my first three versions of the query met those requirements. Apparently, I was wrong. The fourth version is my best yet and seems to be working since I'm getting requests instead of form rejections.
About those rejections... Yes, it's disappointing to hear time and again that an agent doesn't want to represent your work. It's unbelievably frustrating to have no clue why. But form rejections are a way of life for a writer, and perfectly understandable. Agents and editors are busy people and don't have time to write personal rejections every time. A lot of times, the agent or editor never even sees the query. Assistants and interns are the first line of defense, guarding their employer's time and rejecting what they think the agent or editor wouldn't like. With form letters, it's impossible to know if the person you sent the query to ever actually saw it. The best bet with form rejections is to not read anything into them. They just mean "no." If you get a lot of them, reevaluate what you've been submitting. Maybe your query needs a little tweaking or you first chapters could use improvement. Maybe you've just been sending to places that aren't quite the right fit. Once you've done everything you can to insure success (including researching the markets), try querying again.
Personal rejections are a little different. If they give you a reason why your work was rejected, give it some serious thought. If they give you suggestions for improving the manuscript, give it serious consideration. Keep in mind that even these suggestions can be subjective. I've come across writers who received conflicting advice in personal rejections. If several people tell you the same thing, that's a good indication you should listen. If only one person says it, keep it in mind; maybe it's useful to you, maybe it's not. But unless the suggestion makes absolutely no sense at all, it's best not to completely disregard it.
Now, I'm off to critique. Happy writing!