The best time is going to be the one which dovetails with your lifestyle. Consistently exercising is more important than struggling to maintain an inconvenient but perhaps more optimal time.
That said there is a good physiological case to be made for morning workouts. Furthermore this has the habit of getting your day off to a winning start which can ripple through to other areas of your life.
The one thing to watch out for is intense workouts too close to bedtime. The stress hormones released from the workout have the potential to impact some peoples ability to fall asleep and the overall quality of their sleep.
Bottom line, don't worry too much about when you workout. Choose a time which you can sustain.