The concept of death in Dragon Ball Z can get confusing, but it's vitally important. When the average living person dies, their soul is transferred to the afterlife in the form of a small generic cloud and they are placed in heaven or hell for eternity. In special cases, however, those who have performed exceptionally good and selfless deeds -- such as saving a planet or universe from total annihilation -- are allowed to keep their physical bodies in the afterlife as a reward.
The vast majority of the DBZ cast are seen after they die, with heroes in heaven and villains in hell. There's even a humorous anime-only sequence where Dabura, King of the Demon World, is reformed in heaven. But what happened to Vegeta after his two deaths? He is only seen briefly in the afterlife when King Yemma calls on him for an emergency return to Earth after Gohan is absorbed by Majin Buu. But where was he the rest of the time? Did his good deeds and redemption later in the series give him some leeway to avoid going to hell?
Prior to both of his deaths in DBZ, Vegeta had largely lived a life of genocide, greed and selfishness. However, his first death is a deeply moving moment as he begs Goku to stop Frieza from turning anyone else into the kind of person he'd become. Recognizing and admitting one's deepest flaws is one of the most difficult things for any person to do. That said, one touching moment in a lifetime of villainy would not be enough to redeem Vegeta in the eyes of King Yemma or the Kais. Though he's never seen there, it can be safely assumed that Vegeta was sent to hell after his first death.
Vegeta's second death, however, is a bit more complicated. Just before his emotional sacrifice against Majin Buu, Piccolo tells Vegeta that, unlike Goku, he will not be allowed to keep his body due to the overall life he has led. However, the only time viewers see Vegeta in the afterlife is with a physical body while making a deal with King Yemma.
Piccolo's statement was correct, but the situation changed due to the increasingly dire circumstances on Earth. When Yemma calls on Vegeta to discuss sending him back to Earth to rejoin the fight against Buu, he remarks that Vegeta must have noticed he'd gotten his body back. This implies that he didn't have his body before that point and his soul was existing as a small cloud. But rather than send him straight to hell or heaven, Yemma kept Vegeta's soul in purgatory just in case the remaining heroes failed to destroy Buu. A wise and correct decision in the end.
But what would've happened if, say, Mystic Gohan had finished the job against Super Buu and Vegeta wasn't needed? Or what if Vegeta's sacrifice had actually killed Fat Buu and ended the saga there? Would his role in the fight against Perfect Cell and seven years of being a decent husband and father have swayed Yemma to let him stay in heaven like the other heroes? It's highly unlikely. As Piccolo said, a person's entire lifespan is weighed into the decision of whether they go to heaven or hell.
On the other hand, when Dende later asked the dragon Porunga to revive all those who'd been killed since the day of the World Martial Arts Tournament -- except for the worst people -- Vegeta's halo disappeared. A different godlike figure had judged Vegeta to have atoned for decades of horrific sins and changed into a good person. Indeed, life and death remain confusing but vitally important topics in Dragon Ball.