At some time in each of our lives, we struggle with these fundamental questions; 'Why are we here?'  'What does it matter?'  When God created Adam and Eve, he set in motion the creation of the entire human race.  Generation after generation of human beings have gradually been filling the Earth. 

God chose to create human beings with the ability to make choices.  Adam and Eve made a choice to disobey God's word. God tells them, in Gen:2, that the penalty for disobedience is death.  We also learn than sin and death are passed down from generation to generation in Jer. 31:29: 'The father's have eaten the sour grape and the children's teeth are set on edge'.

It says  in Numbers 14 :18 and Deut 5:9, that God will spread out the punishment for sin 'to the third and fourth generation.' There is a purpose to all the suffering and dying. It is, as stated in Romans 7:13 (see Phillips translation)  to learn how sinful sin truly is. 

God also has arranged a way out for the entire human race. In John 3:16, it says 'For God so loved the world, that he sent his only Son….  It is also clearly stated in1 Corinthians 15:22 "As in Adam ALL die, even so, in Christ, ALL shall be made alive. In John 5:28, we read the 'ALL who are in their graves will come fourth…" In Isaiah 35:8, God tells us about the 'Highway that leads to holiness' where nobody will fail,but all will have an opportunity for life and happiness. 

So, in answer to the second part of your question, we are here because God has arranged for the Earth to be filled with intelligent human beings who will have learned from the experience with sin and death to choose life and happiness forever. Isa 11:9, Isa 51:11 and  Isa 65:25. 

If you are in despair that life has no meaning, please take heart. Our God is real. He is the great Creator of all things.  He loves ALL his creation and he will bring life, love and happiness to everyone in his great kingdom of righteousness.  As you wait for that grand time, try to live by the words of Micah 6:8: 'the Lord has told us what is good. What he requires of us is this: to do what is just, to show constant love, and to live in humble fellowship with our God' (Good News Bible)