Unfortunately when it comes to foam it's not Foam is Foam is Foam. There are several types of foam out there. So you can't just say foam is great without saying what type of foam. And you can't compare without comparing the pricing differentials.
It would be like talking about dirt or soils. Everyone on this list has dirt around their house, but the soil types vary wildly which greatly influences building techniques and problems.
The foam being pushed the most by the installers is the one with the most profit potential for them. It is cheapest and the one most trouble prone in the long run.
Foam installers push the soft foam vs. the hard foam. The soft foam is known as a sponge in the industry. It costs less than a third the of the cost of the hard foam so their profit margin is higher because most people think any kind of foam will do. The soft foam has a much lower R value per inch and also retains water. So that leak in your roof or wall line will cause it to remain wet and your wall will rot. Check with the foam suppliers and find out which one they'd install in their own house.
I dont' remember the exact values but in researching foam companies for installation in the house I am currently building I found that the companies that pushed to fill the void with foam were pushing the soft foam and even with filling the void (vs. the skim coat they try to get you to buy) they couldn't equal the R value of a couple of inches of the hard foam.
The soft foam IS a better sound barrier and any foam does seal the house better than any other method.
When I built I used a full OSB exterior wall, Tyvek, PLUS I added 1" thick foam sheets with all joints taped (foam effectiveness falls off near a joint) which gave me a very tight seal so I wasn't as concerned about the extra sealing a sprayed foam would give me as much as people with normal construction would have been.
Due to the price differentials, I ended up with blown cellulose in the walls and a foam barrier under the roof line simply due to costs. A plus is that cellulose is quieter than the soft foam. This whole package cost me about $8,000 vs. the $21,000-$23,000. I simply couldn't justify the difference in price. I didn't get a substandard insulation factor as this gave me a minimum R21 in the walls and R45 in the ceilings.
When the build process began I had 3 bids for foam and they ran from $11,000-$13,000. When it came time to actually install the foam all 3 bids mysteriously jumped to $21,000-$23,000. Come to find out that is normal in the industry. If they told you the actual price of the foam up front you'd never do it. So they get you to build for the foam (like leaving off the radiant barrier to your roof decking) so that you feel you don't have a choice and will bite the bullet when the time comes to install.
So asking is foam worth it is like asking is an engine worth it in my car. What kind of engine are we talking about here? Do you want mileage or performance? Due to the ignorance factor of the public, when it comes to foam, the installers are able to install a VW engine but charge for a Ferrari engine.
With all that said, I am installing DIY VersaFoam in my metal shop walls because of the price. I know it isn't anything near as nice as the "real stuff", but it will quieten down the shop, give me a solid surface to work with for cladding the interior and is a whole lot better for the interior construction I will be doing than either fiberglass or foam. At about $700 for 400 sq feet it makes sense.