The people to whom Habakkuk ministered were Judeans who apparently lived under the reign of King Jehoiakim. During his reign the Israelites were looking for help in the wrong places, Egypt and Assyria, in view of growing Babylonian power. They should have been looking to the Lord primarily, and their failture to do so was one of the burdens of Jeremiah, Habakkuk's contemporary.
Habakkuk's concerns were more philosophical, however. What disturbed him was that the sovereign Lord was not responding to Habakkuk's evil generation and its internal injustices. He voiced his concern to Yahweh in prayer (1:2-4). The Lord replied that He was working. He was raising up a nation that would punish His people for their covenant unfaithfulness 1:5-11). This raised another problem for Habakkuk, which he also took to the Lord in prayer. How could He use a more wicked nation than Judah to punish God's chosen people (1:12-2:1)? The Lord explained that He would eventually punish the Babylonians for their wickedness too (2:2-20). The final chapter is a hymn of praise extolling Yahweh for His wise ways. The purpose of the book, then, was to vindicate the justice of God so God's people would have hope and encouragement.