Robert Frost wrote this poem in one night and, according to him, it just "came to him" rapidly, hence, this tells you that the poem is meant to be universal and has no definite meaning but the one that the reader wants to give to it.
The line "and miles to go before I sleep" is a resolution to the conflict in the story: He wants to interrupt his journey to stop and enjoy the view, but apparently he cannot afford such time expenditure. Therefore, he reminds himself that he is still due other activities, and that his journey cannot just stop there, for he has other things to do.
"before I sleep" could be allegorically speaking life before death, but it can also mean life's paradigm of working before you enjoy the pleasures of retirement. It could mean the sacrifices you have to make in life in order to enjoy anything.
by the time his life ends