You asked 4 questions from once and I will give you 4 answers:
1. The meaning of life is what makes sense for someone who is thinking about it. The meaning from Gods perspective is one thing and the meaning from human perspective is another thing, so its always subjective interpretation of what makes sense and what does not.
2. We dont know but some assume that its "Gods plan" and others that its just a random chance. I think that its possible to say also that it happened because it could not happen otherwise.
3. It can be because of our free will or because we are part of a maschine which works by itself and everything is deterministic.
4. Hope is also a rational decision not just a feeling, so we can decide to still hope for something. There is always a way to look at things from a brighter side and to expect something more and better. One life ends, another starts, one hope dies, another can get born.