There's a bit of difference between types of foam, but how much that impacts structural integrity, I don't know.
One thing you can be sure of is that Styrodur, especially when shaped with a decent cutter, is a great material to build with.
I was always of the opinion that foam would not be sturdy enough for gaming, and I swore by plasticard (or acrylic) and MDF. But eventually I have had to admit that you don't always need bomb-proofed structures on your table.
Gerard from Shifting Lands once gave a workshop for a group of my friends, and when asked about the resilience of his buildings (by me), he demonstrated by casually tossing an entire tower made from Styrodur (and completely detailed and painted, looking very nice indeed) over his shoulder back into the bin he had taken it out of. And it was completely fine.
Foam buildings will not stand up to a person putting their weight on them, but any other tabletop handling will be absolutely fine. In fact, dropping a plaster, resin, MDF or plasticard building onto the floor by accident will always result in (near) catastrophical damage, whereas foam buildings will all take it in stride and come out completely undamaged, because they're so light.
I'm still in the 'build them as strong as possible' camp, and love MDF 'base' structures, but I now also have a Proxxon foam cutter that will see more and more use in the near future...