The narrator does not explain the title, and what is said about it is reading, not a fact of the book. The reading that the plot best supports sees in the two colors the two careers open to a poor young man: the red of the uniform, from the time when Napoleon made generals, and the black of the cassock, the Church career that Julien Sorel chooses out of calculation, not faith.
The support for this reading is in Chapter V of Book One. Julien grew up remembering that Bonaparte, "an obscure and penniless lieutenant," had become master of the world with the sword, but he concludes that the times have changed: now there are priests of forty earning three times as much as Napoleon's generals. Hence the decision: "It is necessary to be a priest." At the seminary, the masons of the cloister recall with nostalgia the time of Napoleon, when a mason could become a general.
The text, however, does not give the color red to the garments of distinction that Julien wears. At the king's visit he parades in the sky-blue uniform of the honor guard, and soon afterward he goes back to wearing "his shabby little black suit." In Paris the marquis gives him a blue suit for the evening, and in the morning he returns to the black of a secretary. Where the red weighs is in the crimson curtains of the church at Verrières: at the beginning, their reflection makes Julien see blood in the water spilled near the holy water font; at the end, under the same crimson curtains, he shoots Madame de Rênal.
The true uniform, that of a lieutenant of hussars, comes only near the end and lasts little: soon comes the letter that undoes the marriage. Read this way, the title sums up the wager of Julien's life: to rise through one of the two doors in a society that, for him, has closed the first.