The short answer is YES, there is a better time to treat.
If you’re talking about white spot disease, their biology dictates that most of the mature trophonts exit the host and the theronts excyst during darkness. The theory behind this behavior is so that when fish are at rest and near the bottom, the parasite would have the best chance at locating a host. Most medications are not effective against the encysted stages of Ichthyophthyrius/Cryptocaryon, but are effective on the motile phases. So, since bugs tend to be released from their cysts during the night, then the most appropriate time to treat would be just at sunset or just prior to lights out. This would mean that the medication is at its highest concentration in the water when the majority of the parasite are at their susceptible phase.
If you’re talking about using medications such at organophosphorus compounds (e.g. trichloron or fenthion), the organophosphorus compounds tend to be broken down more quickly at alkaline pH (high pH). In a planted tank/pond situation, there are diurnal variations in the pH due in most part to a net carbon dioxide use and release. This in turn will affect the pH. Because of the net carbon dioxide being generated during the night, the water would become more acidic. The reverse is true. When photosynthesis is at its peak, the water’s pH will be high. So, having said this, the best time of the day to use OPs is at night.
In addition to this, many chemicals can be broken down by the sun’s UV rays. And this is one of the reasons why UV lights should be turned off when treating aquaria/ponds. So, a night treatment may be better.
These three examples have suggested that night time is the best time to treat. So when might you use medicines during the day?