وَيَهْدِيَكُمْ سُنَنَ الَّذِينَ مِن قَبْلِكُمْ
(And to show you the ways of those before you,) meaning their righteous ways and how to adhere to the commandments that He likes and is pleased with.
وَيَتُوبَ عَلَيْكُمْ
(and accept your repentance) from sin and error,
وَاللَّهُ عَلِيمٌ حَكِيمٌ
(and Allah is All-Knower, All-Wise.) in His commands, decrees, actions and statements. Allah's statement,
وَيُرِيدُ الَّذِينَ يَتَّبِعُونَ الشَّهَوَتِ أَن تَمِيلُواْ مَيْلاً عَظِيماً
(but those who follow their lusts, wish that you (believers) should deviate tremendously away from the right path)) indicates that the followers of Shaytan among the Jews, Christians and the adulterous, wish that you would take the horrendous path of falsehood instead of the truth.
يُرِيدُ اللَّهُ أَن يُخَفِّفَ عَنْكُمْ
(Allah wishes to lighten (the burden) for you") His legislation, orders, what He prohibits and what He decrees for you. This is why Allah has allowed free men to marry slave girls under certain conditions, as Mujahid and others have stated.
وَخُلِقَ الإِنسَـنُ ضَعِيفاً
(and man was created weak.) and this is why it is suitable in his case that the commands are made easy for him, because of his weakness and feebleness. Ibn Abi Hatim recorded that Tawus said that,
وَخُلِقَ الإِنسَـنُ ضَعِيفاً
(and man was created weak), "Concerning women". Waki` said, "Man's mind leaves when women are involved."
Sequence
Mentioned in the previous verses were details of injunctions. Now, in the present verses, Allah Almighty points to his blessings and favours saying that your being obligated with these injunctions is for your own good, even though you may not be able to understand its manifestation in details. Then, along with it, there is the motivation to follow the divine injunctions. Finally, there is the message of alert against the evil intentions of the misguided who wish ill of you and would like you to stray far away from the straight path.
Commentary
Following the description of several injunctions relating to marriage, the present verses say that Allah Almighty is making His injunctions very clear and explicit for you, and He is putting you in line with the ways of the noble prophets and the righteous who have come earlier. Do not think that these details of what is unlawful and what is not are there for you alone. The fact is that communities, earlier than you, were also charged with such injunctions. Those who acted in accordance with them were rewarded with Allah's favour.
Continue reading the tafsir of ayahs 26–27 Matters of external glamour are not the scale by which to judge the honour and importance of an individual. The real standard of greatness is the unseen faith in man’s heart which is in the knowledge of God alone. Thus, whether someone is great or otherwise is beyond the comprehension of man. This unknown aspect will be judged and made known in the court of God. Realization of this fact takes away one’s superiority complex, which is usually the root cause of most social evils.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.