According to traditional Buddhist cosmology, there are six realms of karmic existence; these are (in ascending order of “niceness”).
Rebirth in hell, or as a ghost or an animal is considered “unfortunate,” not only due to the hardships one must endure in such incarnations, but also because it is very hard to escape the cycle of samsara in those realms, or even simply obtain a better rebirth in the future.
Although rebirth in heaven as one of the celestial beings is considered highly desirable for many people, it too has drawbacks. Despite living in luxury and ease, the celestial ones know when they will die, and are often overcome with anxiety and despair as their time of death approaches.
If you want to escape samsara, a human birth is ideal, though far from necessary. Buddhist writings often characterize those in the “lower realms” as too consumed with suffering to attend to their spirituality, while the celestial beings are too distracted to worry about anything much at all.