So in a campaign as a paladin, I cast Wrathful Smite and hit an undead creature. Can undead be affected by the frightened condition?
Some yes, some no. And it's a surprisingly-even split.
There's no general rule on undead: either the Frightened condition (PHB Appendix A) or the Monster Manual's section on undead (MM pp.6-7, "Types") would be the places to look. But each specific undead's stat-block describes whether it is immune to the Frightened condition. (Is there any reason to why the list of undead that can be frightened seems counter intuitive? addresses the "why" of this.)
For reference, the MM has the following Undead which...
cannot be frightened:
Banshee, Death Knight, various Liches, Flameskull, Ghost, Mummy and Mummy Lord, Revenant, and Shadow.
can be frightened:
Death Tyrant, Crawling Claw, Ghast, Ghoul, Bone Naga, various Skeletons, Specter, Wight, Will-o'-Wisp, Wraith, and various Zombies.
There's no rule that states undead in general are immune to being frightened so it depends on what specific undead creature you're attacking.
Some undead do have immunity to the frightened condition while others don't.
A banshee, for example, is immune to being frightened so if you were to hit one with wrathful smite, it would only take the damage and be unaffected by the condition.
Whereas a skeleton or zombie is not immune to being frightened so it would take the full force of a wrathful smite.