The controlling metaphor of Robert Herrick's "To the Virgins, to Make Much of Time" is that of life being like a rosebud. The speaker tells the young virgins to "gather ye rosebuds while ye may," urging them to understand the ephemeral nature of youth. Like the rosebud, the young women have only a short time in which they are beautiful and "when youth and blood are warmer."
Set in contrast to the workings of the universe, the youthful life of the young women is short, indeed. The sun "will his race to run" and will be setting; that is, life ends quickly. The rhyming of "first" with "worst" in the third stanza suggests this inevitability. So, in the last stanza, the speaker urges again the young, warm-blooded women to marry
For having lost but once your prime
You may forever tarry.
Opportunities to enjoy one's youth and beauty and passion are ephemeral when set against the span of nature; if the young virgins do not take advantage of these opportunities, they may lose their chances for happiness and fulfillment. For, like the rose, they will lose their beauty and youthfulness.
To me, the theme of this poem can be captured in two words: carpe diem. This means "seize the day" in Latin. The main theme of this poem is that life is short and that, because life is short, you should take what you can get as soon as you can get it.
The poem is supposed to be aimed at young women. It is telling them that they are now in the primes of their lives. It is saying that when you are in the prime of life, you are about to head downhill towards death. So you might as well live while you can.
Herrick's hope was that readers will be able to read the poem not so much as advice to women to submit passively to marriage, as advice (which can apply to males as well as to females) “to make much of time.” Against “dying” and “setting,” we can “gather,” “smile,” and “run." Take advantage of the time you have now and do as much as you can and enjoy it.