Since fabrics have to be some color or the other, the historic Church has taken advantage of this fact and has used color to set the theme of worship. A consensus has developed about the use of colors in the western Church: green, purple, white, and red.
Green is the default color. Green is the color of vegetation, therefore it is the color of life. Green is the color for the Season of Epiphany and the Season after Pentecost. These two seasons are also called "Ordinary Time" because the Sundays have no names, just ordinal numbers.
In antiquity, purple dye was very expensive, so purple came to signify wealth, power, and royalty. Therefore purple is the color for the seasons of Advent and Lent, which celebrate the coming of the King. Since as Christians we prepare for our King through reflection and repentance, purple has also become a penitential color.
Angels announced Jesus' birth (Luke 2:8-15) and His Resurrection (Luke 24:1-8). The New Testament consistently uses white to describe angels and the risen Lord (see Matthew 17:2 and 28:3, Mark 9:3 and 16:5, John 20:12, Acts 1:10, and throughout Revelation.) In the ancient Church, people were given white robes as soon as they emerged from the waters of baptism. Therefore, white is the color for the seasons of Easter and Christmas. White is the color for funerals, since it is the color of the Resurrection, for weddings, regardless of the season.
Red is the color for Pentecost Sunday and for ordinations and installations, because it is the color of fire and therefore also of the Holy Spirit (see Acts 2:3).