The Sonos soundbar is ideal for those who already have Sonos products, and will stream music to it as well as use it for TV use. Its an easy to set up product that is simple to install, just utilising a connection from your TV (digital or analogue) to the soundbar. The drawback of this is that the quality you will get from the soundbar is limited to the signal that an optical cable can carry - the best you'll get is Dolby Digital Plus, if you can set your Bluray player to down is to this.
The Yamaha acts as the processor, so has HDMI connections to plug everything into instead of plugging them directly to the TV. This may or may not be more convenient for some. The upside is that the Yamaha will decode Dolby True HD and DTS Master Audio, so it has the potential to sound better for movies. The Sonos Playbar may well be a little better for music though, is it does sound rather good when streaming CD quality music.
The Yamaha is also a Sound Projector rather than a Soundbar, and is more flexible to set up in almost any room.