If you are all-knowing, you know your future actions, what choices you will make, and you cannot change them otherwise your knowledge would be wrong, and you wouldn't be all-knowing. An omniscient being has no free will to choose actions; all its actions are predetermined.
“There is a light switch on the wall; God may either turn it on, or leave it off; but, since God already knows the future, God knows that he will turn it on. That is part of his knowledge. But what if God exercises freewill, and chooses not to turn it on. Is this possible?”
If you knew a decision you are going to make in the future... what would it mean? You would have no free will to change that choice. No option, no choices... based on the fact that you know it's going to happen, it is predestined and no amount of strong will can change it. The further in the future the predicted choice is, the less free will you have to change it! Well imagine if for infinity you'd always known exactly what choices you were going to make and that you could never be wrong. You would never have had any free will in any choice, ever!
In effect God is an observer. An omniscient being has no free will - its entire future is set out and it has no choice but to follow its predestined path.
Out of the possible options in a situation God always makes the best choice because it is perfectly benevolent. It cannot do something that is less moral or "good" than something else, because that would not be perfectly good, but merely second-best good. In every situation, God only has one choice: The most moral/good one. God does not have free will. It can make no choices, there are no possibilities for an omniscient-benevolent God to choose from. In order to give God its free will, we would have to take away its omniscience - its all-knowing nature - or take away its benevolence.
When people say that God has free will, they must also mean that God is imperfect. If God is not perfect then it becomes possible for God to choose a less-than-perfect action. If God is not imperfect, then, it is impossible for god to perform imperfect actions. Therefore God has no free will.
A response to this was made on SciForums by beyondtimeandspace (2005 Dec 19), who argued that God could potentially choose between two equally perfect acts. This is more interesting if you hold that everything God does is perfect by causal definition. But the argument destroys itself, as another author on that site points out: If God chooses one act rather than another, then the act that God chooses must be the better act in order for God to have chosen it. Either that, or God behaves randomly (which is not free will). When God acts, it does so perfectly... so there are therefore no "choices" to be made: Whatever choices God makes are the best ones (even between two apparently perfect options), and therefore a perfect God cannot possibly have any genuine free will.
God, as the ultimate creator, created goodness. God is also said to be a perfectly good benevolent God. This means that God fulfils every possibility of the goodness it has created. It is the be-all and end-all of goodness, perfectly good and unerringly good. If God was not 100 percent perfectly moral, God would not be perfect. This results in a complete lack of free will for God.
God knows the nuances and complexities of every situation. God knows which actions are optimal, it knows which actions are perfectly good. Only God, I would guess, is capable of performing actions that are perfectly good. And it does so unerringly, constantly, because it itself is perfectly good and never errs. It is all-knowing and perfectly good. But, the problem is for free will, in any situation, of all the possible things God could do, God does the perfectly morally right one. It never chooses an inferior course of action because it is perfect. If it acted imperfectly, it would not be perfect.
So, in any situation, a perfectly moral God has no choice: It must carry out what action is most good. God, in creating goodness, and being perfectly good, is completely limited to only a set, predetermined series of actions. In any situation, at any point in time or out of time, God has no free will: It must robotically and automatically carry out the precise action that is perfectly good.
But herein lays contradiction: How can a God that has no choice be described as "moral"? A computer, for example, is amoral because it cannot make moral choices; its programming defines its actions accurately. Likewise, God accurately has to follow the optimally most perfect and moral path. God's morality is the same as a computer's: It makes no truly moral choices. This contradiction shows up a fundamental flaw: God cannot be abstractly or actually moral.
Free will is the making of choices according to our own deliberation. Deliberation requires thought, and thought requires change over time. If time was frozen and nothing changed, no-one would have free will. Free will is a concept that only exists inside the timeline. If God is, as is required, a creator of Time and Space, then God exists outside of time. It is senseless to talk of "before" the big bang, "before" the creation of time because there was no "before", no passage of time before then.
In this "void" where nothing changes, God has no free will. Its thoughts can't change and flow because time does not change for anything that extends outside of 4D. Taking the hypercube as an example, it may *appear* to us to change over time as we view it in a series of 3D slices, but in reality the hypercube is completely unchanging from its own point of view. From God's own point of view there is no "thinking", no change in states of mind over time. All choices were instantly made according to what is most "perfect" (if God is a perfect creator), there were never any choices or willpower involved. By its very nature, if God is perfect and created Time, God has had no free will to either engage, change or affect any free will on its own part.
If God changes (i.e., thinks) from one state of mind to another, then there must be a reason. The new state must be better than the old state. But this is impossible if God is perfect: It is not possible to "improve" God, therefore, God cannot change and God cannot possess any ongoing thoughts at all. No free will. The only possible mental state for a God is a static, unchanging, unaltering status-quo.
Did God create free will? How then does it itself have free will? If God created free will then God had no choice in doing so. It must have been predestined to create it. But what created that predestination? God couldn't have created free will; and as God is the ultimate creator, if it didn't create free will then it means that free will doesn't exist, for itself or anything else. Questions and problems like these show that free will is not a valid concept within theism.
It is known by four strong arguments that God cannot have free will.
What is the point of saying that God is moral, if God cannot choose to do anything imperfect? How can it be a moral being, if it has no moral choices? The answer is that God is not a moral being, it is a morally neutral being.