Here is an excellent quote from the Confessions about troubling times.
"Therefore troubles are not always punishments or signs of wrath. Indeed terrified consciences should be taught that there are more important purposes for afflictions, so that they do not think God is rejecting them when they see nothing but God's punishment and anger in troubles. The other more important purposes are to be considered, that is, that God is doing His strange work so that He may be able to do His own work, as Isaiah 28 teaches in a long speech. When the disciples asked about the blind man who sinned, Christ replies that the cause of his blindness is not sin, but that the works of God might be displayed in him.....Therefore troubles are not always punishments for certain past deeds, but they are God's works, intended for our benefit, and that God's power might be made more apparent in our weakness."
(From the Apology, Article XII, paragraphs 61-63).