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 Genesis 2:17, that the penalty for disobedience is death. We also learn than sin and death are passed down from generation to generation in Jeremiah 31:29: "The fathers have eaten the sour grape and the children's teeth are set on edge."
There is a purpose to all the suffering and dying. Our experiences teach mankind how sinful sin truly is. "...sin, so that it would be shown to be sin, produced death in me...sin would become utterly sinful." Romans 7:13 (NET)
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 begotten Son...." and 1 Corinthians 15:22 teaches, "As in Adam ALL die, even so, in Christ, ALL shall be made alive." Therefore, all mankind has been redeemed through Jesus' death. But will every single man, woman, and child be raised and blessed in the resurrection? Yes! John 5:28 emphasizes that "ALL who are in their graves will come fourth..." What will happen when Jesus resurrects mankind? The blind will see; the lame will walk; all physical infirmities will be healed. (Isaiah 35:5,6) During Christ's reign on earth, people will be taught righteousness. Jeremiah 31:33, 34, "...I will put my law in their minds and write it on their hearts. I will be their God...they will all know me...For I will forgive their wickedness and will remember their sins no more." On that symbolic "Highway that leads to holiness" (Isaiah 35:8), 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. Isaiah 11:9, Isaiah 51:11, and Isaiah 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)