Read Romans 8:28
28 Moreover we know that to those who love God, who are called according to his plan, everything that happens fits into a pattern for good. (JBP)
This is a verse many of us cling to when things seem to make no sense. It is important to recognise that Paul is not glibly saying that it will all work out for everyone in the end. This is a promise to those in a family relationship with God and who are thus caught up in his great purposes.
We also need to recognise that what God determines as ‘good’ might not be our idea. Immediately following this verse is one that indicates our true destiny is to be like Jesus. So it seems that ‘good’ is defined as to what achieves this purpose. A thing might not seem to be comfortable or desirable, but yet may be good because it achieves God’s good purposes. We cannot claim this verse as an insurance policy against disappointment or setback.
One other thing: the ‘good’ God might make of your present circumstances might not be the same ‘good’ he had prepared for you if you had obeyed him rather than disobeyed him. Acts of disobedience on our part do not mean God can’t or won’t work them for good. But it just might mean that the good he works might differ from that which he would have worked had we not disobeyed.
Even so, we are encouraged that God is able to pick up the broken pieces of our lives and make something of them.