
God is the One who created everything from nothing. He knows every minute detail of what is going on. There is no limit to His knowledge, wisdom or ability, and He does whatever He wishes (Ps.115:3).
When God created us, the difference He made for us from the animals was not only that He gave us a spirit, just like His, in addition to body and soul (mind), but also that He gave us the ability to make our own choices in every situation. This is a part of His nature, and without this He cannot have any meaningful relationship with us. Now we have the ability to love or reject Him, and this ability is what makes His relationship with us real and 'living'.
Our 'free will' has limitations within our abilities. We are subject to natural and spiritual laws. Whatever we do will also cause consequences, which we cannot avoid, and we are accountable to God (Ga.6:7).
God, on His side, generally respects our free will and so allows us to make our own decisions even when He knows some of them would hurt us. He would rather allow us to make mistakes and learn from them than to control us. At the same time, He loves His children enough to intervene if we might fall into serious trouble (Ps.37:23,24).
Some people find it difficult to consider man having a free will because they imagine it implies loss of God's sovereignty. But we must not forget that it was God's sovereign decision to create us with a free will. God also controls the boundaries of our 'free' will.
But such people also assume that God is the author and initiator of all things that happen. So they get upset with God when they face something bad in their life. Some even say that God sits there and sends us calamities, sicknesses and accidents to teach us. But God is entirely good, and never does anything evil. The evil that we all experience may be due to our own sins, others sinning against us or simply because we are living in this sin-cursed world. It is absolutely wrong to blame God for them.
NASB gives a good translation of Ro.8:28, "And we know that God causes all things to work together for good to those who love God, to those who are called according to His purpose." God is not causing all things to happen. But for those who love God, He does something further with what happens to us, in order to bless us.
His ultimate goal is to change us into the character of Jesus. Whatever happens to us in this world, He wants to train our minds using them to mould us into His image (v.29). What we think about things and how we respond to them make the difference (Ro.12:1,2).
We can see what will happen if we complain, become bitter, etc., when bad things happen to us. So, if we really want to become like Jesus, we need to learn from God through what we go through in life. How important it is to listen to the Holy Spirit as He tries to teach us! If we focus on defending ourselves instead of opening up to His scrutiny, won't we be the losers? But "today is the day of salvation" (He.4:7).