ELL, there is no question about when this book was written or about who wrote it (vs. 1). And it is immediately obvious that this is a postexilic book (compare Ezra 3:2 & Haggai 1:1). The ancient empires of Assyria & Babylon were gone from the world stage by the time Haggai began to prophesy. A remnant of the Jews had returned to Jerusalem for the purpose of rebuilding the temple of Jehovah, which the Babylonians had destroyed decades earlier. But the Jews had gotten distracted from their objective. They decided that is was not a good and convenient time to build the temple (vs. 2), however, they were more than willing to build their own houses (vs. 4).
Because the Jew's priorities were out of order, God refused to bless their efforts. Their agriculture & their business endeavors were not successful (vs. 6 & 9-11). Not that God didn't want to bless them, He just wanted to bless them for going about the right things in the right way. So, He commanded them to build His house (vs. 8). And they obeyed (vs. 12). It would seem that the exile did the Jews quite a bit of good. They were definitely a bit more responsive to their prophets after their captivity than they had been before it. Apparently, Haggai preached for 23 days (compare vs. 1 to vs. 15). But his persistence paid off & lives were changed as a result.
How about us today? What is more important to you and me? Spiritual food, or physical food? The carpet in our bedroom, or the carpet in the church hall. The paint at home, or the testimony of the church? The cleanliness of our own house, or the holiness of our congregation? Our knowledge of our favorite sports team, or our knowledge of God?