I am currently creating a species similar to a squirrel. It lives in a rainforest-type environment and eats fruit. Its predator is a cat-like creature that ambushes it. The average temperature on the planet is roughly 90 degrees Fahrenheit (around 32 degrees Celsius). Would it make more sense for the creature to be diurnal or nocturnal? It might be able to detect its predator better during the day, but during the nights, the temperature would be cooler. Would the shade be enough to keep it cool? Would a different method (preferably active as opposed to passive) be better?
Herbivores have very short sleep period, for the obvious reason that they need to feed often and even more often be alert against predators and evade them.
For sure in a hot environment being active during the cooler hour is an advantage, while the day can be spent just seeking shelter from the light and limiting the activity as much as possible. This is for example what happens in the savanna, where most of the activity happens away from the sunlight.
On the other hand, if your creature is a tree dweller, moving on the trees at night to reach the fruits might be too risky: one need good vision to estimate how to move between the branches and also to judge which fruit are ripe and which not, and that would favor being active during the day.