[deleted]
The colors did not originate with the parties -- Republicans and Democrats did not choose those colors. Instead, the colors originated with TV news.
The first election-night map on color TV was on NBC for the 1976 election, however with that map, the colors were reversed: blue indicated states that voted for the Republican candidate, and red the Democrat. Throughout the 1980s and '90s, the colors varied by network -- there was no standard, as no one really thought of either party being associated with one color.
The "red state/blue state" rhetoric really didn't solidify until the 2000 election, when the whole thing came down to Florida, and we had the lengthy wait that extended well past election night. As people kept checking in with the news to see whether there was a winner, they became more and more interested in that big ol' electoral map of the US, and commentators took to saying "red state" or "blue state" as a shorthand for the lengthier "Republican state" or "Democrat state". The terms red state and blue state took on a sense of political slang, and by 2004, they were set in the public mind enough that they had already become synonymous with partisan politics. Politicians and pundits started using those terms in speeches and editorials, and the colors stuck.