I would consider the intelligence of the undead in question and its alignment. If it has enough personality left to qualify as "evil", then I'd say it has a soul (whether its own or anothers), since it is able to choose to be evil. If the undead is unaligned, then its possible it's soulless, since it doesn't understand morals and ethics. We know some soulless or nearly soulless beings can act in a semi-intelligent manner (i.e. Golems), but these beings generally aren't aligned or are Neutral. The text in the Monster Manual (or other source) sometimes specifies things like this (i.e. Liches definitely have souls, abeit not in their skeletal bodies.) If the text doesn't say, your guess is as good as anybody's.If you decide the undead is intelligent, it should certainly be able to attune to magic items, unless it otherwise fails to meet a specific requirement (i.e an evilly-aligned undead trying to attune to a magic sword that requires a good-aligned wielder.)