In the Qur'an Allah mentions why we created:
I created the jinn and mankind only to worship Me. (Letter
As mentioned in this paragraph, the existence of human beings on this earth solely to be a servant of God, to worship and to obtain His pleasure. Human servitude to Allah is the touchstone for his life on earth.