The sun, which is heaven's light, won't always be around forever as well. As the sun gets higher in the sky, it is half way towards it's end. Similar to how women reach a "prime" at a certain age and afterwards their beauty starts to fade, "the higher he's a getting." The sun will have to dim and begin to vanish just like how the women's beauty will also start to fade away like the sunlight, "the sooner will his race be run, and nearer he's to setting."
The age that is the best is when women are young and energetic, "that age is best which is the first, when youth and blood are warmer." But when they start to get older and experienced, such as working, worrying, and upholding responsibilities, the beauty will begin to diminish and time will be harsher by escaping from them, "but being spent, the worse, and worst, Times still succeed the former."
So in order to make your beauty long-lasting, don't be flirtatious and waste your time. The narrator is instructing women to use their time wisely to be able to extend the life of their beauty, "then be not coy, but use your time." If they have the opportunity to, to go and get married because once your time of beauty is gone, you might stay in the same place forever, "you may forever tarry."
Gather ye rose-buds while ye may,
Old Time is still a-flying;
And this same flower that smiles today
Tomorrow will be dying.
The glorious lamp of heaven, the sun,
The higher he’s a-getting,
The sooner will his race be run,
And nearer he’s to setting.
That age is best which is the first,
When youth and blood are warmer;
But being spent, the worse, and worst
Times still succeed the former.
Then be not coy, but use your time,
And while ye may, go marry;
For having lost but once your prime,
You may forever tarry.