Fire hydrants are often painted red mainly because red is a highly visible color associated with alertness, danger, and emergency equipment, making hydrants easy to spot quickly by firefighters, especially in low light or smoky conditions. Red also has a long tradition as the universal color for firefighting equipment—fire trucks, extinguishers, and alarm boxes are typically red for the same reason of instant recognition.
However, it's a common misconception that all hydrants are or must be red. In many places, hydrant colors and cap colors actually follow standardized coding systems that communicate specific information rather than just "fire = red." For example, in parts of the United States, the National Fire Protection Association (NFPA 291) recommends hydrant bonnet and cap colors indicate the water flow rate available (e.g., light blue for very high flow, green for high flow, orange for moderate flow, red for low flow). Some municipalities paint the hydrant body a uniform color (often yellow, which is even more visible against typical backgrounds than red) while using color-coded caps for flow classification, and body colors can also indicate the water source (e.g., public vs. private supply) or ownership by a particular utility.
So in practice, hydrant color varies by jurisdiction: some cities stick with all-red hydrants for tradition and visibility, others use yellow or other bright colors for better contrast against grass, pavement, or snow, and many use color-coded tops to give firefighters instant information about water pressure without needing to test the hydrant first. Because there's no single global standard, the "why red" answer is really a mix of historical convention, visibility/psychology of the color red for emergency contexts, and — where red is still used — sometimes specific flow-rate coding rather than pure tradition alone.