The short answer: Whenever you’ll do it. The long answer: It depends on your fitness goals.
Studies have shown that that the human body naturally performs best between 4 p.m. and 8 p.m., which also happens to be the time when body temperature is at its highest. Strength, endurance, flexibility and reaction time have been shown to peak, if only slightly, within this four-hour window. So if you're gunning for a personal best on the bench press, or want to impress your friends on the basketball court, this might be the ideal time to try.
If, however, your goal is to lose weight, you might want to exercise first thing in the morning. A 2010 study published in the Journal of Physiology showed that exercising on an empty stomach helps the body burn fat more effectively.
And if your goal is to perform well at a specific event, it’s in your best interest to work out at the same time of day you’ll be competing. Studies have shown that training regularly at the same hour can increase an athlete’s ability to do high-intensity exercise at that certain time. If your marathon starts at 7 a.m., for example, try doing your training runs at 7 a.m. to improve performance at that time. If you only have a few days before your event, don’t fret. One study showed improvement in competition after just one day of training at the same time.