The peer review system is a major way of establishing credibility and quality of scientific research articles. On balance, peer review undoubtedly improves the quality of research articles - and perhaps of research projects as well. However, there are a number of problems with the way that the system currently works that make it less constructive and it could be.
Really good peer reviewers also envision constructive ways that the research project and the research paper could be improved to meet their potential. This requires investment. It requires developing a vision for the project. This takes time and thought. In a way, good reviewers are the unacknowledged secondary or tertiary authors on published articles.
Less constructive reviews point out deficiencies in the paper without elaboration of what could be done to address them. Sometimes reviewers are snooty or contemptuous in a thinly veiled way. I believe that such reviews are a byproduct of a system that inadequately rewards reviewers for their work.
The difficulty is that peer reviewers are anonymous most of the time. If you publish your own papers, you progress in your academic career. The same reward structure does not seem to exist for doing peer reviews. On top of that, if reviewers are at all insecure about their own work (let's face it, most people are) they face the temptation to self-enhance by denigrating the work of others.
Early in my graduate school career, I was asked to write a review for a manuscript that I viewed as deeply flawed. My first draft of the review was scathing. When I showed it to my advisor, he told me, "I don't care if the paper is a steaming turd. You still have to treat the authors with compassion. Start off with the good qualities of the paper. Can you imagine any way that they could turn the paper around so that it could be published?"
The humanity of his advice struck me deeply, and I regularly remember it when I am reviewing papers. Life is hard enough. Even in academia, let's be kind to each other. It is better for science.