I would be careful with it. Some styrofoam can outgas small quantities of harmful fumes that may not be detrimental to you, but for a small snake curled up in it, perhaps a sadly different story. And since a LOT of this sort of stuff comes from China these days, with a whole lot less safety controls and inspections, that would be even more worrisome to me.
If you want the festive decoration, try going to a hardware store with a lot of outdoor decorations and try to find such things made out of hardened clay. That would likely be safer.
IMHO.