The best way to answer these questions is to first understand who God is in the context of worship. God by definition is the One who is entitled to our worship; it is a necessary fact of His own existence. The Qur’an repeatedly highlights this fact about God,
“Indeed, I am God. There is no deity except Me, so worship Me and establish prayer for My remembrance.”
Since God, by definition, is the only Being that whose right is our worship, then all of our acts of worship should be directed to Him alone.
In the Islamic tradition, God is considered a maximally perfect Being. He possesses all the perfect names and attributes to the highest degree possible. For example, in Islamic theology, God is described as the The-Loving, and this means that His love is the most perfect love and His love is the greatest love possible. It is because of these names and attributes that God must be worshipped. We always praise people for their kindness, knowledge, and wisdom. However, God’s kindness,
However, God’s kindness, knowledge, and wisdom are to the highest degree possible with no deficiency or flaw. Therefore, He is worthy of the most extensive form of praise and praising God is a form of worship. God is also the only One entitled to our supplications and prayers. He knows best what is good for us, and He also wants what is good for us. Such a Being with these attributes must be prayed to, and to be asked assistance of. God is worthy of our worship because there is something about God that makes Him so. He is the Being with the most perfect names and attributes.
Such a Being with these attributes must be prayed to, and to be asked assistance of. God is worthy of our worship because there is something about God that makes Him so. He is the Being with the most perfect names and attributes.
An important point regarding worshipping God is that it is His right even if we are not recipients of any type of comfort. If we were to live a life full of suffering, God is still to be worshipped. Worshipping God is not dependent on some kind of reciprocal relationship; He gives us life, and we worship Him in return.
Do not misunderstand what I am saying here, God showers us with many blessings; however, He is worshipped because of who He is and not necessarily how He decides—via His boundless wisdom—to distribute His bounty. There are many other reasons why God is worthy of our worship (which involve love, being grateful for our blessings, etc.), however, this specific topic will be addressed in another article.
Does God need our worship?
This common question arises due to a misunderstanding of God in the Islamic tradition. The Qur’an and the Prophetic traditions clearly explain that God is transcendent and free of any need; in other words, He is absolutely independent:
“Indeed, God is free from need of the worlds.”
Therefore, God does not need us to worship Him at all. He gains nothing from our worship, and our lack of it takes nothing away from God. We worship God because—through God’s wisdom and mercy—He created us that way. God made worship good and beneficial for us, from both a worldly and spiritual perspective.
Why did He create us to worship Him?
What follows from this answer is usually the question: Why did God create us to worship Him? God is a maximally good Being, and therefore His actions are not only good, they are expressions of His nature. In addition, God loves good. The fact that God has created rational creatures who would freely choose to worship Him and do good, some to the point of becoming exalted in virtue like the prophets, and then being given eternal life in the presence of God, to pass an eternity of intimate love and companionship, is the greatest story ever told.
Since God loves all good, it is clear why He would make this story a reality. In summary, God created us to worship Him because He wants good for us; in other words, He wants us to go to paradise.
He has made it clear that those who attain paradise have been created to experience His mercy:
“If your Lord had pleased, He would have made all people a single community, but they continue to have their differences—except those on whom your Lord has mercy—for He created them to be this way.” 
God creating us to worship Him was inevitable. His perfect names and attributes were going to manifest themselves. An artist inevitably produces art work because he has the attribute of being artistic. By greater reason, God would inevitably create us to worship Him because He is the One worthy of worship. This inevitability is not based on need but rather a necessary manifestation of God’s names and attributes.
Another way of answering this question is to understand that our knowledge is fragmentary and finite, so we will never be able to fathom the totality of God’s wisdom. As previously mentioned, if we comprehended all of God’s wisdom, it would mean we would become Gods or that God would be like us. Both are impossibilities. Hence, the very fact that there may be no answer to this question indicates the transcendence of God’s knowledge.
In summary, He created us to worship Him due to His eternal wisdom, we just cannot comprehend why.
A practical way of looking at this question is explained in the following illustration. Imagine you were on the edge of a cliff and someone pushed you into the ocean below. This water is infested with sharks. However, the one who pushed you gave you a waterproof map and an oxygen tank to be able to navigate via safe areas in order to reach a beautiful tropical island where you will stay forever in bliss.
If you were intelligent, you would use the map and reach the safety of the island. However, being stuck on the question Why did you throw me in here? will probably mean you are eaten by the sharks.
For the Muslim, the Qur’an and Prophetic traditions are the map and the oxygen tank. They tell us how to navigate the path of life safely. We have to know, love and obey God, and dedicate all acts of worship to Him alone.
Fundamentally we have the choice of harming our own self by ignoring this message, or embracing the love and mercy of God by accepting it.
Last updated 30 January 2017. Taken and adapted from my book “The Divine Reality: God, Islam & The Mirage of Atheism”.
 The Qur’an, Chapter, 20, Verse 14.
 The Qur’an, Chapter, 29, Verse 6.
 Mahali, J. and As-Suyuti J. (2001) Tafsir al-Jalalayn. 3rd Edition. Cairo: Dar al-Hadith, p. 302. You can access a copy online at: https://ia800205.us.archive.org/1/items/FP158160/158160.pdf [Accessed 1st October 2016].
 The Qur’an, Chapter 11, Verses 118 and 119.