The food temperature danger zone is generally considered to be 40°F to 140°F (4°C to 60°C). This is the temperature range where harmful bacteria can multiply quickly, increasing the risk of food poisoning.
I usually follow the simple rule of keeping cold foods refrigerated and hot foods properly heated. Don't leave cooked food sitting at room temperature for more than 2 hours, or 1 hour if the temperature is above 90°F (32°C).
For safety, refrigerate leftovers promptly and reheat them to 165°F (74°C). A food thermometer is really useful for checking temperatures accurately.