يَـأَيُّهَا النَّاسُ اعْبُدُواْ رَبَّكُمُ الَّذِىْ خَلَقَكُمْ وَالَّذِينَ مِن قَبْلِكُمْ لَعَلَّكُمْ تَتَّقُونَ
Oh mankind! Worship your Lord (Allah), Who created you and those who were before you so that you may acquire Taqwa. (Surah Al-Baqara: 21)
SubhanAllah, this is the first command in the Qur'an, and it comes only after Allah SWT educates mankind about Himself, The Most High, in Surah Al-Fathiha, about His Book (The Noble Qur'an) that it is Guidance for the believer, and the characteristics of believers, disbelievers and the hypocrites. This shows that Allah SWT has given us the free will to choose, but has given us the guidance and the truth before He commands anything from us.
SubhanAllah, the command is all mankind, and not just the believers. The Qur'an is for all mankind to pay heed to.
Our purpose in this world is to worship Allah, alone with Ikhlaas (sincerity and total submission to Him). Through worship, we can acquire taqwa- fear of Allah, love and hope, sincerity, humility in front of the Lord Almighty.
And Allah knows best.