... Reading the instructions on the can is the best way to determine when it's optimal to paint, or not optimal to paint. In general, you shouldn't paint when it's above 80 degrees out or in direct sunlight. If the 'surface' being painted is cooling from a hot day, it may be OK to paint. In this case, it just depends on 1) what the temp is going DOWN to, and/or 2) what the humidity will be.
Most paints and stains operate under similiar conditions. (Some don't, like Drylock. You can put it on a damp wall.) Fast-drying paints will differ from slow drying ones, and oil-based will differ from water-based, and so on. In short, for your particular paint, it's best to read the can.