Red light has the longest wavelength among all visible colors, which allows it to travel longer distances without scattering as much as other colors.
This makes red light more visible and noticeable even in poor visibility conditions, such as fog or rain, which is why it is used for danger signals.
Thus, danger signal lights are red because red light travels further and is more visible, especially in low visibility conditions.