Officially - that is, if you’re a restaurant owner or something like that - the longest you’re allowed to leave it out at room temperature is about two hours (or at least it is here in the UK).
Obviously that wasn’t what you were asking, but there is no specific moment when an item of food suddenly becomes unsafe to eat. In order to become ill, you need to ingest a sufficient dose of the pathogens that cause food poisoning (or the toxins the leave in the food) - how quickly an item of food will reach this point (if at all) is dependent upon the composition and the storage conditions.
Furthermore, susceptibility varies from one person to the next - a dose sufficient to make one person seriously ill may be shrugged off by another with no more than a case of the trots.
At room temperature, I would guess that a slice of pizza consisting of bread, tomato sauce and cheese would actually dry out and spoil beyond edibility before it became significantly dangerous to eat. A similar pizza, but topped with, say, lots of meat and, mushrooms (i.e. protein and moisture) may become dangerous to eat before it becomes unpalatable.