Hezekiah was a good king and a good man.
He believed and obeyed God. Early in his reign, Hezekiah destroyed the idolatry in Judah. The Bible tells us, “He removed the high places and broke the pillars and cut down the Asherah. And he broke in pieces the bronze serpent that Moses had made, for until those days the people of Israel had made offerings to it (it was called Nehushtan). He trusted in the LORD, the God of Israel, so that there was none like him among all the kings of Judah after him, nor among those who were before him,” (2 Kings 18:4-5 ESV).
This doesn’t mean Hezekiah was perfect. From a study of Isaiah chapters 30 and 31, it is clear that the King’s government made a serious mistake when threatened by the invasion of the Assyrians. Hezekiah evidently listened to his advisors and decided to make a treaty with Egypt to defend Judah against the onslaught that took Israel into captivity. This good king evidently caved into pressure and from that error, lost several fortified cities of his country to the Assyrians (2 Kings 18:13ff; 2 Chronicles 32).
God wanted Hezekiah and Judah to trust in him, and was disappointed when Judah went looking for help from a country that was in its sunset years. God said, “Ah, stubborn children,” declares the LORD, “who carry out a plan, but not mine, and who make an alliance, but not of my Spirit, that they may add sin to sin; who set out to go down to Egypt, without asking for my direction, to take refuge in the protection of Pharaoh and to seek shelter in the shadow of Egypt! Therefore shall the protection of Pharaoh turn to your shame, and the shelter in the shadow of Egypt to your humiliation,” (Isaiah 30:1-3 ESV).
Hezekiah learned his lesson, because when the Assyrians laid siege to Jerusalem, the king of Judah laid the problem out before the Lord and begged God’s help (2 Kings 19:15ff).