The implementation of the "winner-takes-all" electoral system in the USA results in most individual states not splitting their congressional representatives and their electors proportionally among the political contenders but favoring the party with most of the votes.
The color "red" thus represents states which go to the Republican party, and those won by the Democrats are called "blue" states.
Despite a long history of associating the main political parties with the colors red and blue, modern media broadcast eventually led to today's color coding, most visible in the electoral maps on the screens of TV sets across the country on election night.