This varies. However, according to research, 5-6pm is supposed to be the best time for most people to exercise and work out.
This is because muscle and body-core temperature is at it’s highest and endurance levels are at their peak.
If this exercise-time is inconvenient, choose your own work-out time. The point is, whether you want to lose weight or just stay healthy, exercise is vital. So do it whenever you can.