Egypt raises it's ugly head again in this account. Egypt nearly always represents the bondage of sin in the Scripture and that bondage is linked strongly to flesh and contrary to promise.
Think of Esau trading what was promised for immediate satisfaction and Jacob employing deceit to obtain now what God could deliver to him if it was His will.
Think of Israel in the wilderness longing for immediate security represented by the "fish we ate in Egypt that cost nothing, the cucumbers, the melons, the leeks, the onions, and the garlic. - Numbers 11:5" when, indeed the cost was slavery and all the promises of God.
Think of Abram "going down to Egypt" to escape famine in the land. There he virtually pimped his wife for fear and material gain. He left Egypt with possessions (ill-gained) so great it forced separation between he and Lot. It is likely that Sarai acquired her handmaid Hagar while in the land of bondage.
Now Abram and Sarai are aging and the promise of God for offspring is waning fast. Hagar is put forth as the means (fleshly, immediate) of actuating God's promise. As soon as Hagar conceives the Scripture reports:
And he went in to Hagar, and she conceived. And when she saw that she had conceived, she looked with contempt on her mistress. - Genesis 16:4
This does not indicate a spirit of meek obedience but, rather, the haughty pride of the flesh which exalts itself above and looks with contempt upon the promises of God. This is why Paul allegorically contrasts the two in Galatians. Paul is deeply concerned because the Galatians are being coerced to go back under the law...to go back into bondage...to grasp with the flesh that which is obtained by promise. Contempt always follows because it is borne of disappointment.
The law exposes and magnifies sin when righteousness and peace are sought there. Righteousness and peace are of promise. Seeking freedom through slavery produces contempt for those who are truly free by promise. And so, Hagar, producing by flesh what was to be of promise and knowing that flesh had actually circumvented promise rather than wait for it in faith (for Ishmael was no true heir of promise):
But it is not as though the word of God has failed. For not all who are descended from Israel belong to Israel, and not all are children of Abraham because they are his offspring, but “Through Isaac shall your offspring be named.” This means that it is not the children of the flesh who are the children of God, but the children of the promise are counted as offspring. 9 For this is what the promise said: “About this time next year I will return, and Sarah shall have a son. - Romans 9:6-9
This Hagar looks with contempt upon the means of promise and, by extension, the promise giver. This blog post from Catholic Exchange looks, in part, at Hagar's return to captivity as a prefiguring of Israel's yet future slavery in Egypt:
Hagar, the slave from Egypt, foreshadows Israel, the future slaves in Egypt.
but it does not say anything in regards to Hagar prefiguring Israel's refusal to come out from under the bondage of the law when her Messiah arrived. However the account in Genesis 21 indicates that the contempt of Hagar has been passed along to her son:
And the child grew and was weaned. And Abraham made a great feast on the day that Isaac was weaned. But Sarah saw the son of Hagar the Egyptian, whom she had borne to Abraham, laughing. So she said to Abraham, “Cast out this slave woman with her son, for the son of this slave woman shall not be heir with my son Isaac.” And the thing was very displeasing to Abraham on account of his son. But God said to Abraham, “Be not displeased because of the boy and because of your slave woman. Whatever Sarah says to you, do as she tells you, for through Isaac shall your offspring be named. And I will make a nation of the son of the slave woman also, because he is your offspring.” - Genesis 21:8-13
And so Hagar looks to be a picture of God's faithful providence through Abraham as well as judgement for contempt toward the promise.
This is handled somewhat in Augustine's exposition of Galatians which Ken Graham referenced ably in his answer above.