Depends on the sword shape, desired durability, weight, and appearance.
If the sword shape is pretty complex, then it may be easier to make it out of foam, as it doesn't need to support as much weight.... however, it'll be that much more fragile...
Durability is self explanatory, if you make a sword out of foam or cardboard vs wood... obviously the trade-off here is weight and cost.
Appearance is another factor. If your going to paint it, you may want to stay away from "real" wood and go for engineered wood like MDF.... less problems with the grain soaking up paint and causing uneven paint...
Weight is also self explanitory, if your making the dragonslayer (berserk sword that Guts uses), then your not going to make it out of metal. Best stick with foam/lightweight wood for this.