The phrase originates from a short poem by Edna St. Vincent Millay, which reads:
I burn my candle at both ends,
It will not last the night.
But ah, my foes, and oh, my friends,
It gives a lovely light.
Basically, its meaning
centers around the fact that if you burn a candle at both ends, while
the light it gives forth will be brighter, it also won't last as long.
An alternate interpretation would be that if you burn a candle at both
ends of the day - that is to say, both early in the morning, and late
into the night - it wouldn't last as long either.
So if you were to say of someone that he burns his candle at both
ends, you would mean that he is perhaps doing too much at once, not
getting enough sleep, or living wildly but destructively.