In western culture, black has been a symbol for death, mourning, sin & evil, and the strange or the "other", but also of humility, and of writing and literature.
- Black as a symbol of death (sometimes associated with night) goes at least as far back as Homer's Iliad, where Death and Ker (plural: Keres) are black. Black is also the colour of the personified death in Statius's Thebaid and in Seneca's Oedipus. Hesiod's Theogony also mentions "black Ker". In Dante's Divine Comedy, Hell and the devils are black.
- Black as a symbol of mourning can also be found in Homer's Iliad. It is also the colour of black bile, which, in the theory of the four humours, causes "melancholy" or depression.
- Black as a symbol for the devil, sin and evil can be found in the Bible (Acts 26, 18).
In western culture, white has been a symbol of innocence, virginity, virtue, the holy but sometimes also of death.
- White as a symbol of innocence, virginity and virtue goes at least as far back as the Book of Revelation (3, 4f): "Thou hast a few names even in Sardis which have not defiled their garments; and they shall walk with me in white: for they are worthy. He that overcometh, the same shall be clothed in white raiment; (...)." (King James Version). For this reason, the white lily has often been used as an emblem for the Virgin Mary.
- White as a symbol of the sacred and godly wisdom and sublimeness can be traced back to Exodus (chapters 26-27), where the tabernacle should have a kind of white linen fence. The god Apollo was also associated with white.
- More recently, white has also been associated with the power of untamed nature over humans, e.g. in White Fang and Moby-Dick.
(White as a symbol of death is much more recent; there are several examples in 19th-century German literature.)
Works of literature that specifically use the contrast between black and white are also old. For example, in Plutarch's Theseus, Theseus promises to his father to return on a ship with white sails if he survived, otherwise the ship would have black sails. Due to an unforeseen incident on the way back, the sailors forget to put up the white sails, and Theseus's father Aegeus, seeing the black sails, commits suicide before the ship reaches the harbour.
However, the Theseus myth uses a distinction between white and black sails, not on black and white as skin colour. An example of this can be found in Jean Bodel's La Chanson des Saisnes ("Song of the Saxons", late 12th century, France), in which Saxons and black Nubians fight against white Franks. The Saxons are the enemies and are portrayed as oriental Saracens. In this way, "white" and the Franks ("we") are associated with the good side, and the "others" (Saxons and black Nubians) and black with the bad side of the story.
Main source: Günter Butzer and Joachim Jacob (ed.): Metzler Lexikon literarischer Symbole. Second edition. Stuttgart: J. B. Metzler, 2012.
Update: Sometimes, the meaning of "white" is unclear. One example of this is the "white rider", the first of the Four Horseman of the Apocalypse in Revelation, 6, 1-2:
And I saw when the Lamb opened one of the seals, and I heard, as it were the noise of thunder, one of the four beasts saying, Come and see.
And I saw, and behold a white horse: and he that sat on him had a bow; and a crown was given unto him: and he went forth conquering, and to conquer.
This figure has sometimes been interpreted as Jesus, because is described as riding a white horse in Revelation, 19, 11 and sometimes as the antichrist. (See Hope Bollinger: Who Are the Four Horsemen in Revelation? Their Meaning and Significance and
Douglas S. Winnail: The Mysterious First Horseman!.)