Allah SWT says in the Holy Quran "We have created death and life to test which of you do good deeds". In another verse of Holy Quran Allah SWT says we have created Humans and Jins so that they Worship us. So above Verses of the Holy Quran answers our questions about purpose of this life. This life is a Test for Human beings to do good deeds as God has ordered us or stay away from bad deeds from which our Creator has stopped us.
Holy Quran also tells us that there will be Judgement Day for our deeds in these World. A Person who will do good deeds will be entered in Heaven on day of Judgement and a person who will do bad deeds will enter Hell. Allah SWT also says in the Quran that on day of Judgement Justice will be done with everyone according to his deeds in this World. In this Article i have tried to explain Shortly the Islamic Point of view about Purpose of life if you want to know in detail you can search for big articles on Google. May Allah SWT help us in fulfilling the real purpose of our life.