The first STOP sign appeared in 1915 in Detroit, Michigan. There were a variety of colors used for STOP signs until the late 1920s, when the background color was standardized on yellow for maximum day and night visibility. Remember that this was several years before the invention of glass-bead retro-reflectorization for sign faces, so a red sign looked very dark at night.
By 1954, sign makers were able to use durable fade-resistant red coatings for sign faces, so the background color of the STOP sign was changed to the red color you see today. This change also served to distinguish the regulatory STOP sign from yellow warning signs, and made the color consistent with that of red traffic signal indications, which for decades had used red to signal “stop”.