When is a good time to curse someone? When God’s angry at them! When is that?
Explaining the cause of God’s anger, it was taught in a baraita in the name of Rabbi Meir: When the sun rises and the kings place their crowns on their heads and bow down to the sun, the Holy One, Blessed be He, immediately grows angry. Since this occurs in the early hours of every day, God becomes angry at His world at that time every day.
So, you want to curse someone at that particular moment at dawn. Now, what happens when one of our rabbis uses this knowledge? Let’s read and find out:
There was a certain heretic who was in Rabbi Yehoshua ben Levi’s neighborhood who would upset him by incessantly challenging the legitimacy of biblical verses. One day, Rabbi Yehoshua ben Levi took a rooster and tied it by its legs and sat and waited (when the roosters gullet is clear from sunlight, then it’s time to curse!). He said: When that moment of God’s wrath arrives, I will curse him. When that moment of God’s wrath arrived, Rabbi Yehoshua ben Levi dozed off. When he awakened, he said: Conclude from the fact that I dozed off that it is not proper conduct to curse even the wicked, as it is written: “Punishment, even for the righteous, is not good” (Proverbs 17:26). Even with regard to heretics, a righteous person should not state a curse in order to punish them.
Ha! So, don’t curse anyone, even if you think they deserve it.

