The meaning of life in terms of science could be about the scientific needs of human, such as eating to live, reproducing to have a family and many other factors. In terms of religion, life could mean doing good karma and abiding by the rules within a community. Altogether, the meaning of life in my opinion, is living in the human body and experiencing different situations - which could also involve problems and challenges.
Honestly, It just depends on what your belief is. Some people, like the Christians and Muslims think its a test from God to see who's good and bad. Scientifically, its just a way for us humans to live and survive, and mate, and die old.