Here's the rules from a purely mechanical standpoint:
Any spell with the [Evil] subschool is an evil spell. Many, many necromancy spells fall into this camp. A cleric that worships a Good deity cannot prepare these spells, period, because their deity forbids them. Casting a spell with the [Evil] subschool is an evil act.
As an example, here's the classic one:
Animate Dead
School necromancy [evil]; Level antipaladin 3, cleric/oracle 3, sorcerer/wizard 4; Domain death 3, souls 3Since it carries the [Evil] subschool tag, it's an evil act to cast this spell and your alignment can change from doing so.
Compare to the following:
Inflict Light Wounds
School necromancy; Level antipaladin 1, cleric/oracle 1, inquisitor 1, witch 1Even though it's a necromancy spell, casting Inflict Light Wounds isn't an evil act. A cleric that worships a good deity can freely prepare and cast this spell with no risk of alignment change (unless he's using it at your local orphanage).
Necromancy as a school isn't an entirely evil school. Many spells are evil in it, but that's just a side point.
As for non-evil undead, you'll find that many templates allow the intelligent undead creature to retain their previous alignment, meaning they can remain neutral or good aligned even as an undead creature. For example, the Ghost template in Pathfinder, which says it's unlikely but possible:
http://www.d20pfsrd.com/bestiary/monster-listings/templates/ghostWhen a soul is not allowed to rest due to some great injustice, either real or perceived, it sometimes comes back as a ghost. Such beings are in eternal anguish, lacking in substance and unable to set things right. Although ghosts can be any alignment, the majority cling to the living world out of a powerful sense of rage and hatred, and as a result are chaotic evil—even the ghost of a good or lawful creature can become hateful and cruel in its afterlife.