Habakkuk was an Old Testament prophet. We don’t know a lot about him. He was seeing a lot of violence and destruction which was causing him to feel bad.
The entire chapter 3 is a song to the LORD that he wrote. Have you ever really thought about how many songs and musical things are in the Bible? God must LOVE music! My Bible has instructions at the end of verse 19 that say this prayer is to be accompanied by string instruments.
I’m not sure what all was going on when Habakkuk wrote this, but he was full on putting his hope in the LORD. I wrote in my Bible, “Even when things look bad, hold on! God knows and He will help!”
If the people of Habakkuk’s time didn’t have figs, grapes, olives, wheat, or cattle, that means their food supply would be bad. Habakkuk said to rejoice ANYWAY! Be joyful anyway. Even if things look bad, keep moving forward. God is working behind the scene and He has great things in store!