The answer to that question is plainly right there beside everyone the entire time. The thing is God allows things to happen as a wake up call to us to go back to the way we used to do things. America was a Nation founded on Godly principles and we have slowly and purposefully moved in our own direction.
So where has God been in America? Well in a book I have been reading through answers the question like this. We kicked God out of our Government, our schools and we are even beginning to take the pledge of allegiance out of schools because it says "One Nation Under God". We have literally wiped God completely out of every aspect of our lives as a country.
So if you only want God to be around to help when things are bad then why should he keep his hedge of protection over us as a Nation. When everything is going good America completely ignores the blessings that God has given to this country, and when things are bad we wonder where God was. Well he has been there since the beginning, and he has not went anywhere, but at a certain point he will allow things to take place to bring us back. If we refuse as a Nation (which we have) he will allow further problems to arise.
If we want the prosperous America we once had we are going to have to go back to the things that we once did. We allowed God to be in control. If anyone wants to argue that point think of this. How many times have you seen violence in schools since we removed praying and speaking of God? If we don't believe that removing God was the cause then we are all in serious denial.