Overall meaning :
Directing His believing servants to embrace virtue and good morals and to avoid vice, the Almighty says: Allah enjoins His servants to maintain justice by fulfilling His rights and people’s rights, to worship Him in a perfect manner and show kindness to His creation and to maintain ties of kinship and give relatives their due. He forbids all manner of evil words and deeds and everything He does not approve of, as well as wronging and oppressing people. Allah admonishes you so that you may remember His commands and benefit from them.
Allah Almighty further commands them to fulfil all obligations: Fulfil all your obligations to Allah and to the obligations into which you enter with people as long as they do not involve any sin, nor break the covenants that you have solemnly confirmed by an oath, calling upon Allah to be witness to your faith. Allah knows all that you do.
Then He strikes out a parable to show the evil deed of breaking oaths after confirming them: Do not be like the woman who untwists the yarn which she has firmly spun, by using your oaths as a means of deceiving those with whom you make covenants, and you break your covenants when you find a particular group more powerful or more useful than the one with whom you have initially made a covenant. By commanding you to honour your covenants, Allah only tests you, even if some people are better than others, so that those who obey Him will be distinguished from those who disobey His commands. On the Day of Judgement, He will make clear to you all that about which you now differ in this world.
The Almighty then explains that nothing whatsoever can possibly frustrate His power and purpose: Had Allah so willed, He would have made you all follow the same religion, namely Islam, but in His wisdom He leaves to stray whoever He wills for preferring error to guidance, and He guides whomever He wills through His grace and favour; and He will certainly call you to account on Judgement Day for whatever you have done in the life of the world and repay you according to your actions.