Allah commands His servants to be dutiful to parents, after urging them to adhere to belief in His Tawhid, because a person's parents are the cause of his existence. So he must treat them with the utmost kindness and respect, his father for spending on him and his mother because of her compassion for him. Allah says:
وَوَصَّيْنَا الْإِنسَانَ (And We have instructed man - 29:8). Wasiyyah (وَصِیَّۃ) means to call someone for some action, when the call is based on advice and well wishing. (Mazhari)
بِوَالِدَيْهِ حُسْنًا (to do good to his parents - 29:8). The Word Husn (حُسن) is an infinitive which means ' to be good'. at is meant here is to adopt good behavior. The meaning of the sentence is quite clear that Allah Ta’ ala has advised man to treat his parents kindly.
وَإِن جَاهَدَاكَ لِتُشْرِكَ بِي (And if they insist upon you that you should ascribe partners to Me - 29:8). It should be taken note of that the limit of kind treatment with parents should not go beyond the point where it comes in conflict with the injunctions of Allah Ta’ ala. If they force toward infidelity or associating some one with Allah, then they must not be obeyed, as advised in a hadith لَا طَاعَۃَ لِمَخلُوقِ فِی مَعصِیِّۃِ الخَالِق (A created being must not be obeyed in, disobedience of the Creator). This Hadith has been reported by Imam Ahmad and Hakim رحمۃ اللہ علیہما who has held it as Sahih).
Of all the creatures, a man’s parents have the greatest right over him. But, just as everything has a limit, so also do the parent’s rights have a limit, in the sense that—according to the Prophet’s tradition—‘no obedience may be shown to any creature if it means disobedience to the Creator.’ The rights of parents must be observed, but only so long as they do not clash with the rights of God. The moment a parent’s order clashes with God’s order, it becomes as necessary at that time not to follow his or her order as it is necessary to follow his or her order in ordinary circumstances. In Islam the rights of parents means service being due to them, but not worship.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.