Allah has given man a free will. He does not force man to obey or disobey. Allah, The fact Allah knows what we are going to do does not mean that we do not have free will, knows whether man will obey or disobey.
Akhirah (life after death)
Life on earth is meant to be a preparation for the Akhirah (life after death) Life is meaningless if people of good actions are not rewarded and people of bad conduct are not punished at the Day of Judgment. Muslim believers will be rewarded for their good actions by admitting them to ٣
Janah (Paradise) Wrong-doers and unbelievers will be punished in Annar ( Hell Fire ).