Which alliance - red or blue?

For a match how is it decided that particular team will be in red or blue alliance?

At the beginning of the tournament a peice of software called “Tournament Manager” is run. This generates all the matches and assigns each alliance their color for each match. You should be prepared to be both red and blue at some point during the day when you are in a tournament.