The dragonballs of Namek can bring back a person as many times as they die. There is no "Only once" rule on them, like there is on earths.
Vegeta became "good" because he was weaker then Goku. He knew he could never beat Goku in a fight. Then when the androids came he faught them to show everyone how powerful he had became. When he lost he went to train to become better.
Then cell comes, and Vegetas no match for perfect cell. So when Gohan, the son of a 3rd class clown, beats cell, he cant go back to his evil ways again. Then over time, he just got used to living on earth and even started to love Bulma, and his Son.
It wasnt that he woke up one morning and said. "Oh gee im going to be good for now on." No he knew there were people stronger then him, that could beat him to a pulp. He would never admit that out loud but he knew it.