For the most part, the foreign kings mentioned in 2 Chronicles were real-life kings who probably had contact with the rulers in Judah and Israel at one time or another. The Chronicler sometimes remembers these encounters a little differently from the kings' own accounts in the historical record. Let's take a look.
Huram is a ruler in Phoenicia who helps Solomon build the Temple. Of course, he also knows his place because he tells Solomon that "because the Lord loves his people he has made you king over them" (2:11).
This great queen is the one famous ruler on the list that scholars aren't sure ever existed, though the popular theory is that she lived in Ethiopia. According to the Chronicler, when she hears how awesome Solomon is, she travels to Judah to see for herself. After presenting him with a series of riddles, which he answers correctly, she concludes that "the report was true" (9:5). Solomon is indeed as wise as he was billed. Before going back home, she presents him with gifts of spices and bling.
Shishak is a friend to the Northern Kingdom, so he attacks King Rehoboam in Judah. God explains this unfortunate turn of events by explaining, "You abandoned me, so I have abandoned you to the hand of Shishak" (12:5). Most scholars think he was actually the Egyptian Pharaoh Shesonk I. But even cooler than appearing in the Bible is getting name-dropped by Indiana Jones.
When King Asa asks for Aram's help, "Ben-hadad listened to King Asa, and sent the commanders of his armies against the cities of Israel" (16:4). This ends Israel's blockade in Ramah and frees up Judah to fight.
Hazael wounds King Joram of Israel in battle. No worries, he deserved it for "doing wickedly" (22:3). His name is also mentioned on the Tel Dan Stele. That's a stone fragment found in the Middle East that records Hazael's military victories against Israel and Judah. Guess the Chronicler left those out.
This guy rules the most powerful empire in the world despite having an unpronounceable name. King Ahaz asks for his help, but he ends up attacking Judah instead after destroying the Northern Kingdom. "The Lord brought Judah low because of King Ahaz of Israel" (28:19).
Sargon might not be mentioned by name, but he's the one who gives the final pounding to the Northern Kingdom of Israel in 722 BCE. King Hezekiah suggests that the northerners "return to the Lord […] that he may turn again to the remnant of [them] who have escaped from the hand of the kings of Assyria" (30:6). If only they'd listened.
Sennacherib tries to attack Judah, but had to go home when "the Lord sent an angel who cut off all the mighty warriors and commanders and officers in the camp of the king of Assyria" (32:20). Sennacherib tells this story a little differently in his own writings. He says that he attacked, won, and shut Hezekiah up in Jerusalem "like a caged bird." Oh, ancient burn.
Neco doesn't want to fight with Judah and even warns King Josiah not to mess with him because he is "at war and God has commanded [him] to hurry" (35:21). Josiah attacks anyway and dies in the process.
This favorite Biblical villain levels Jerusalem in 587 BCE, but only because God lets him. The Chronicler says that God "brought up against them the king of the Chaldeans, who killed their youths with the sword in the house of their sanctuary, and had no compassion on young man or young woman, the aged or the feeble" (36:17). Sad, because he and Zedekiah used to play soldier in nursery school.
Our hero! The great Persian king conquers Babylon and then tells the Jews to return to Jerusalem and rebuild the Temple. Again, only because "the Lord stirred up the spirit of King Cyrus" (36:22).
Some of these monarchs are small-time kings of tiny nations. These rulers would have been on par with the kings of Israel and Judah. But others ruled over the mightiest empires of the day. They overran much of the known world and deported the populations back to their empires.
But whether we're dealing with an emperor or a minor ruler, the Chronicler only really cares about them as far as they intersect with the lives of the Jewish people. When these kings are good and helpful, they're aligned with Judah in battle or in trade. These good foreign kings serve to show off the political savvy of the kings of Judah. These alliances with powerful rulers enhanced the prestige of the Judean kings. The problem is that sometimes these alliances backfired.
On the other hand, the kings that make trouble for Judah don't ever do this of their own free will. The Babylonian Empire was a lean, mean, conquering machine, but they wouldn't have stood a chance against Judah without God's help. Sargon II didn't decide to attack Israel on his own. God instead used these foreign kings as a way to punish his disobedient people.