How does a book chapter in an edited volume compare to a peer reviewed paper?
Like a lot of things in academia, I think this will heavily depend on what discipline you're in. In computer science for example, while there's nothing wrong with a book chapter, a paper at a conference or in a journal is typically more valuable.
The reason normally given is that papers are peer reviewed (as compared to edited), so they are somehow more 'valid'.
Having said that, there's always myriad exceptions. Writing a whole book that everyone uses is much better than a few papers. Later in the career, book chapters perhaps gain value as they're a mark of respect and prestige (once you've already proven your research ability).
As a counter-point though, from my limited experience, it seems that book chapters are much more common in bioinformatics and operations research, and thus are viewed more highly.
Talk to fellow academics in your area, their opinion will be the best guide.
In my field a peer reviewed article counts for a lot more than a chapter in an edited book. That said, a published chapter in an edited book counts a lot more for job searches than a working/submitted/under review/under revision manuscript. Often edited books lead to a publication in press much quicker than a journal. I would definitely look into the time scale of the book chapter.
It's based of field but the general rule is to pump articles because they are peer reviewed. However some publishers have a review process so if the chapter is in a handbook or in a collection that will be important to the field then you're good. Look at publisher rankings and try to only publish chapters under top ranked book publishers. If you're a junior tenure track then ask colleagues and dean for tenure and promotion info. I will say that in the humanities or social sciences you are more likely to have your chapter cited by another person in their work than an article. Hope some of this helps.