Punctuation is a matter of convention. Some conventions are very strong, like the use of the full stop/period, and comma.
Here, "pent-up" is an adjective. It is a commonly accepted convention that compound adjectives (formed from more than one word) are hyphenated, like in your case and also e.g. mealy-mouthed, self-centred, warm-hearted, soon-to-be, would-be. However, I would say that is a convention which has become weaker over time, partly through ignorance, and partly through an increase in informality. I recommend that English learners follow the convention, especially in formal writing.