In my opinion, the best time to exercise is the time that works best for YOU. If you force yourself onto the treadmill at 5:15 am even though you're not a morning person, that is a plan that probably won't last very long. The goal is to live this new lifestyle of yours/mine/ours FOR LIFE, so exercise needs to fit into your life conveniently. I go to the gym based on my work/school/work (

) schedule...this means 10am some days, 3pm other days, and occasionally 8pm - 9pm.
I've heard all sorts of opinions about what time is best...morning seems to be the most common answer. But if you do 20 minutes at 5am or 20 minutes at 7pm, you've still done 20 minutes -- and therefore burned (at least roughly) the same amount of calories. If there's a difference at all in number of calories burned based on time of day, I honestly don't know -- my trainer has never said anything about it, and early morning exercise isn't something I ever even CONSIDERED cuz I'm a lazy bugger! You could cruise around online, tho, to see if there's any info about early morning exercise = more calories burned. Or maybe one of the trainer-Mods will answer...
As for eating, I eat something high in protein (or a full meal, depending on what time it is) about an hour before I go to the gym. And I usually have a protein shake on the way home from the gym.