Symbolism, Imagery, Allegory
Red and white is a dynamic color combo. Candy canes. The Canadian flag. The fashion of both The Cat In The Hat and Waldo of Where's Waldo? fame. Oh, yeah: and the virgin/whore dichotomy in Tess of the D'Urbervilles.
These two colors come up all over the place in Tess, frequently together. Red is often associated with sin and/or sexuality in Western art and literature (just think about "the woman in the red dress" in The Matrix), while white is usually associated with purity and chastity.
Hardy mixes these two colors so frequently that it's hard to ignore—in the very first scene in which we see her, Tess is wearing a white dress with a red ribbon in her hair—"the only one of the white company who could boast of such a pronounced adornment" (2.14). So Tess is wearing white (the color of purity), but is also the only woman in the group wearing a red ornament (scandalous!) to offset the white.
This could be Hardy's way of waving a red flag (pun intended) at the reader, to show us that Tess 1) isn't like the other girls, and 2) is somehow going to trouble the traditional distinctions between purity and sexuality.
Let's look at one more example, from the very end of the novel: Mrs. Brooks, the landlady at the hotel where Alec and Tess have been staying, discovers that Alec has been murdered when she notices that "The oblong white ceiling, with this scarlet blot in the midst, had the appearance of a gigantic ace of hearts" (56.18).
This example is a little more ambiguous. The white (representing purity or innocence?) is being stained with red (representing guilt or sin?). But the shape of the bloodstain is telling, too—it forms the shape of a heart. Tess has told Alec that he had broken her heart... and she stabbed him in the heart.
Whose is the guilt represented by the bloodstain? It's not really clear. But the frequent mixing of red and white throughout the novel suggest that these are exactly the questions Hardy wants us to be asking.