Generally, most ways that turn you undead also specify that your alignment becomes evil, whether it's templates or being recreated as a specific undead creature. There aren't any rules that I know of regarding alignment shifts for good creatures that became evil undead to shift back to good, but it is something I'd allow.
It isn't really stated to be a hard rule that undead always have to be evil - ghosts are a notable exception as there have been non-evil ghosts in Paizo content. I don't think you will find any RAW rules to answer your latest questions, except that RAW most creatures become evil after being made into undead and would therefor lose abilities and class features that depend on alignment and the following of good edicts such as paladins and good clerics.
I have always ruled it that the trauma of dying "corrupts" the mind into becoming evil, but it is possible to shift back to good. One in world example of the philosophy behind this is that many people who have had experiences from dying and being resuscitated report feeling utterly at peace while dead and being reluctant and even angry at being brought back to life. In PF terms, I interpret this as the soul accepting being moved on to the next stage, and becoming twisted and resentful when a necromancer rips them back into their corpse as an intelligent undead.