Insha Allah I would like to take talk about a very complicated topic for the next two weeks. This is the topic of destiny (taqdeer). You hear many people argue that if Allah SWT is the one who wills me to do something then why should I be punished for it. So people say that Allah SWT willed me to do x, y or z. The question one must ask is if this understanding is correct?
Yes, we can say that Allah Willed me to do x, y, and also z. Nothing moves or is brought to rest, except by the Power of Allah, in accordance with that which His Will specified and what He knew with His Knowledge.
Realizing this is key to the perfection of ones faith.
This is why the Prophet (Allah bless him & give him peace) asked one of the Companions, Shall I not guide you to words that are a treasure from the treasures of Paradise? He said, Indeed, O Messenger of Allah!
The Prophet (Allah bless him & give him peace) said, There is no ability or power except through Allah (la hawla wa la quwwata illa billah). [Bukhari (3883); Muslim (4873), and others]
Allah tells us this clearly in the Quran: Allah hath created you and what you do. [Quran, 37.96]
And: Lo! this is an Admonishment, that whosoever will may choose a way unto his Lord. Yet you will not, unless Allah wills. Lo! Allah is Knower, Wise. He makes whom He will to enter His mercy, and for evil-doers hath prepared a painful doom. [Quran, 76.29-31]
However, it is at the same time true that Allah has made us morally responsible for our acts and it is we who shall be questioned about the choices we made.
Allah tells us that,
We shall question, every one, of what they used to do. [Quran, 15.92-93]
He will not be questioned as to that which He does, but they will be questioned. [Quran, 21.23]
Great Islamic theologians said: Allah has willed that you act based on choice.
As for how this works, it is beyond the understanding of the intellect.
It is important to understand, too, that Allah is as unconditioned by time as He is unconditioned by space: both are His creation, and He is beyond both.
As such, Allahs Knowledge, Will, and Power relate to things beyond time. He knows the result from before the match ever happened.
As such, Allahs Knowledge relates to all things necessary, possible, and impossible from pre-eternality. Allahs Will specified some of that which is possible with particulars in pre-eternality, in accordance with His Knowledge. His Power brings things into temporal existence, in accordance to that which His Will specified
The way to understand this is to enlighten ones heart, mind, and soul with remembrance of Allah and recital of His Book with contemplation.
So in essence, although your actions come into existence only by the will of Allah SWT, Allah SWT has given you the freedom to do what you want and it is the actions from this freedom that will be questioned on the day of Judgement.