This question has come up a few times. You can search for "spray or batt insulation" at the top of the page, and find lots of opinions. Here is one question that received several good answers:
Hello my name is William I own a small company here in Houston for my experience spray is better but sometimes is not work it . is better the pink panter
99% better. Pay back for foam installation averages around 6 to 8 years.
It stops air flow 100%
Fiberglass has its place. The garbage can. You will see in the future that this stuff will be banned because of the glass fibers getting into the air. Its nasty to work with as well. It must be installed properly which in most cases it is never done right. The air barrier must be perfect or the R value of the insulation will diminish as well. If its not installed properly it can promote mold development as well as rob the house of heat.
Foam has a much higher R value per inch then any other type of insulation available. It is also the most expensive. But with the many government programs for green energy and the Energy Star program rebates are all over the place.
Now if your speaking of blown in insulation in attic areas or dens-packing insulation within the walls. This is a much better step above the batt insulation but still not as good as foam. The biggest disadvantage to blown in insulation is once you do your attic. It is very difficult to find any splice boxes for electrical. You must protect any high hat light fixtures from being covered, unless rated to be covered. You must baffle all soffit areas so the insulation can be built up along the edges without it spilling over into the soffit area plugging the air to the attic. And you must install at least a R-30 value which depending on brand and type of blown in material you will end up putting in 18 to 20 inches of the stuff when all is said and done. It is much easier then batts as it fills all the cavities that you would have to cut around and fit the batt insulation in. it is faster to install, once you get past all the prep work that in involved before you put in in.