Science dont have answers to such questions.

What is the purpose of life?
What was b4 life?
what will be after?

and religion tries to answer them.. isnt it?

I am a muslim , and hence believe in islamic view of life,

please no offence, different people have different views and faith, i m telling about islam ,my faith..

in islam we believe that god , angels(creatures who sincerely obey and worship and praise god and never disobey)

,jinns(a creation of god who exist simulataneous to us , not visible to human eyes, who may obey or disobey, the devil is from them) existed b4 us.. and there might have been several other of his creations,

god , we believe is one , and has power over all things , and is always existing, he doesnt have a birth or death , a wife or a son, he has created beings so that they would worship him and obey him , we are all his slaves, they sea, the wind and every little thing that exist everything works with his command,

he made the paradise, the hell , the universe, the animals and all other beings etc

anyways coming to the life , he made humans, the first man adam and his wife eve, and for sometime they lived in heaven and with the will of Allah they were sent down to earth for a purpose,to worship Allah

from them the human race began , and as time elapsed people forgot their lord , got misguided by satan(devil) , went astray, Allah sent prophets , sent his message through angels,

Many believed , many didnt , every body chose there own path of life,

why did Allaah create us?

The answer is: so that we would worship Him, thank Him and remember Him, and do that which He has commanded us. This is because Allaah wants to test His slaves as to whether they will worship Him or worship others. That is after Allaah has showed the way to everyone. Allaah says (interpretation of the meaning):

“Who has created death and life that He may test you which of you is best in deed” [al-Mulk 67:2]

“And I (Allaah) created not the jinn and mankind except that they should worship Me (Alone)” [al-Dhaariyaat 51:56]

Allah has given us mind to think , make choice, eyes to obeserve his creation, has created such complex universe, and gave us the ability to understand whats right and wrong ..

so that we would choose the right and shun the wrong ,

death will be painful for wrongdoers, and easy for the on right path,

and when people die, if they were steadfast in islam, they would be in peace and if they were the wrongdoers there will be the punishment of the grave until the day of judgement..

when all the people will be raisen back to life , and then Allah will do justice between everyone , and there will be paradise and hell...

then it will be an eternal life, either in the heaven or hell,

and one more thing, pls dont think that by worship i mean only praying, indeed earning ur living , marrying, and many other deeds necessary for life when done with good intention comes in worship, ie living our life as per allahs wish,

May Allah forgive me if i have said something wrong

tc