This question gets tossed around quite a bit and should definitely be thought through.
The text is quite clear. The context is the book of Exodus, specifically the revelation of God in the ten plagues against the nation of Egypt in order to bring about the redemption of Israel from bondage.
Walt Kaiser observes the following concerning the hardening:
“In all there are ten places where ‘hardening’ of Pharaoh is ascribed to God (4.21; 7.3; 9.12; 10.1, 20, 27; 11.10; 14.4, 8, 17). But it must be stated just as firmly that Pharaoh hardened his own heart in another ten passages (7.13, 14, 22; 8.15, 19, 32; 9.7, 34, 35; 13.15). Thus the hardening was as much Pharaoh’s own act as it was the work of God. Even more significant is the fact that Pharaoh alone was the agent of the hardening in the first sing and in all the first five plagues. Not until the sixth plague was it stated that God actually moved in and hardened Pharaoh’s heart (9.12), as he had warned Moses in Midian that he would have to do [4.21].”
So we see God actively acting in hardening Pharaoh’s heart. And we also see the clear responsibility of Pharaoh in the matter, as he hardens his own heart.
Well how did God harden Pharaoh’s heart? God simply revealed himself. He revealed his power, supremacy, love for his people, hatred of sin, etc.. through the signs and wonders of the plagues. It was this revelation of God that hardened his heart.
Some say it is not fair that God hardened his heart. Well God revealed, he showed himself to Pharaoh through the signs and plagues. It was this revelation that hardened his heart. It is a biblical axiom that revelation devoid of illuminating grace hardens sinful hearts. As someone else has said, ‘the same sun that melts the wax can harden the clay.’ You may be thinking of John 8.45 where Jesus said, “But because I speak the truth you do not believe me”.
So we come back to the old and familiar issue of unbelief. The primary reason for a hard and unbelieving heart is not God. The cause of a hard, calloused angry heart is an unbelieving (depraved) heart that bucks against divine revelation. The unbeliever hates and so suppresses the truth in unrighteousness. The issue is neither with the revelation nor the Revealer but instead it is the receiver of the revelation that is on the hook. It is the sinner that must be conquered and this is because he is a sinner!
And so the need for powerful irresistible grace is clear! Once again the Christian is brought back to reality and escorted unto humility as we are reminded that without God’s loving, merciful, conquering grace in our lives, we would stiffen our necks and harden our hearts in persistent devaluation of the God who powerfully reveals himself.