Rigid Foam Is Rigid
If you are creating a thermal barrier on the interior or exterior of a flat wall, rigid foam does the job nicely. Problems arise when you attempt to use it in a space or location that features curves, obstacles or irregularities. Unlike fiberglass batts, rigid foam is rigid and is very unforgiving if you don't cut it to the right size. If you need to insulate a space with a lot of pipes or other features, you can spend hours with rigid foam trying to shape it properly. This problem can be overcome to some extent with the use of expanding foam to fill the gaps that are inevitably left in the rigid foam.
Rigid foam is more expensive than many other types of insulation in terms of dollars to R value (the measure of thermal effectiveness per inch of insulation). The higher cost is justified in some applications, for example insulating the outside of a basement wall, due to the convenience and resistance to moisture of rigid foam. In other applications, however -- particularly when they involve cavities and oddly-shaped areas -- a less expensive form of insulation such as fiberglass batts will perform better.
A fairly major disadvantage of rigid foam insulation is that if you set it on fire and breathe its fumes, you may die. This hazard is ameliorated by building codes that require rigid foam to be covered by flame retardant materials such as drywall, but it is still a concern in the event of a house fire. Individuals who are particularly sensitive to chemicals and impurities may want to avoid this material in their homes.