Believe it or not, the time for physical activity varies according to the goals you want to achieve.
If you are looking for performance, there is no significant variation, just like for aerobic endurance, the time of day does not matter.
While for training, to achieve very high-intensity endurance and short duration. In flexibility, speed, strength and especially in power, you perform better in the evenings (18.00 hours) and at dusk because you reach a higher body temperature, which improves muscle performance and decreases the risk of injury.
If the objective is body composition:
Advantages and disadvantages:
Training first thing in the morning:
Forces you to go to bed earlier. It is harder to skip a workout because of unforeseen events, and it activates you for the rest of the day. And, above all, it generates more regularity.
Disadvantages: You need a more extended and progressive warm-up.
Train in the afternoon:
If you work in the mornings and have no family occupations in the afternoons is the ideal time. You have more strength, and it is not easy to injure yourself. You are more awake and release the stress accumulated during the day.