Solomon's temple had been destroyed by the Babylonians. When Cyrus of Persia allowed the children of Israel to return to the promised land, they started to rebuild the temple, but soon gave up. The Lord sent the prophet Haggai to admonish them, and the building of the temple resumed.
The book of Haggai includes an interesting eschatological prophecy.