A study of King Hezekiah's life is one that can be greatly beneficial for us.
In his life we can see a man of great accomplishment: He restored the Passover observance immediately upon ascending to the throne. He undid all the idol worship that his father Ahaz had promoted throughout the land. He withstood the pressure to submit to Assyria. He rerouted the Gihon spring into what we now call Hezekiah's Tunnel. He accomplished so much. In fact, "He succeeded in everything he undertook (2 Chron 32:30)."
The foundation for these many accomplishments was a faith in the LORD. One of the reasons I think it is beneficial to study the life of Hezekiah is to see Hezekiah's sin, the time his pride directed his trust away from the LORD and toward himself.
Yes, it's possible for a godly person to fall in that way and to be restored. So often people think that being godly means never sinning or wavering in faith. However, we see from the life of Hezekiah that even godly men at times lose their way. That's not to excuse anyone's sin, but it is to say that we need to be careful in the way we define godly. And the definition isn't "being perfect."
Godliness deals with the heart. Certainly, the more God matures us toward godliness, the less we should sin. However, the focus of godliness is on the heart's desire to obey and trust the LORD. Notice that God mercifully restored Hezekiah when he repented. And, in spite of his sin, he is described as a good king.