In the prophecy of Joel, the author describes a terrible locust plague that had devastated the land of Israel. Grain, trees, and vines were destroyed and the people were left with nothing to eat. As Joel began his prophecy, they must have wondered why God would allow such a terrible thing to happen to them. They soon learned that it was their own sin that had brought about the calamity. And God was using it to call them to repentance (2:12-14) and restoration.
"God only inflicts punishment after great provocation, and when He does so, it is meant to draw man back from further and more severe visitations of the wrath of God. ... He is gracious beyond words and ready to forgive. God is always more willing the bless than to blast, to pardon than to punish, to win by love than to wound by lashing."
— Charles L. Feinberg in The Minor Prophets (Chicago: Moody Press, 1948), 77, 78.
Difficult situations are not always the result of our sin; think of Job. But as with the people in Joel's time they can be a result of our sin. And when it is, you can be sure that God will use a variety of circumstances to get our attention with the intent of leading us to repentance. He does this for our own good, because he loves us. And thankfully, he does not change. The same God who confronted his people during Joel's ministry is still ready to forgive those who turn from their sin and seek him again.