In 538, Cyrus the Great of Persia conquered Babylon, incidentally ending the Babylonian Exile. He died in 530, and was succeeded by Cambyses II. Cambyses died in 522, and was succeeded by his brother, Bardiya, for a few months. Darius the Great then became emperor after a coup the same year.
Haggai’s prophecies occurred in three revelations throughout the second year of Darius’ reign–approximately 520-19. His prophecies are instructions to Zerubavel and the High Priest Yehoshua to restore the Temple. His message from HaShem promises that the Jews of the Return will begin to prosper and enjoy the fruits of the Blessing when they build a new Temple. Whereas Yehezkiel said that the remnant should rebuild the Temple when they were ready to recommit to the Covenant, Haggai calls the remnant out for delaying that recommittment unnecessarily.
One of the interesting things about this book is that Haggai specifically refers to the Israelites of the Return as the “remnant of the people.” Preceding prophets (Yeshaiyahu, Yeremyahu, Yehezkiel, Amos, Micah, Havvakuk, and Tsephaiah) repeatedly talk about a remnant being gathered together after suffering HaShem’s judgment.
Haggai also makes multiple references to HaShem “shaking the skies and the land”. Haggai 2:22 says He will “destroy the strength of kingdoms.” Considering that Darius the Great conquered from Egypt to the present-day Balkans and Pakistan, including Babylon, Elam, and Assyria, with his campaigns starting in 516, I’d say that’s a pretty good description of what happened through the Persian Empire under Darius’ rule.