Symbolism, Imagery, Allegory
You may have seen this in a book or a film before, but every so often an artist will use lightness and darkness as symbols.
And Joyce does the same thing. Except in his formulation, the central heroic characters – Stephen and Bloom – are actually associated with darkness instead of the light. Stephen is dressed in black because he is still mourning for his mother, and Bloom is dressed in black because he is mourning for Dignam. In a way, this darkness pairs the two of them from the very beginning. Aside from turning the traditional light is good, dark is bad analogy upside down, darkness also comes to stand in for a number of things that make Stephen and Bloom unlikely heroes. For example, darkness is associated with Bloom's Jewishness, Stephen's uncertainty and doubt, and both of their statuses as alienated men. Stephen and Bloom get left out of the spotlight, so to speak.
By contrast, lightness becomes associated with superficiality. Boylan, for example, is dressed in light clothes and has what you might call a shining persona in town. But we get little evidence in the novel that he is a very deep and substantive man. It's almost as if the "lighter" characters are simply reflecting light that is not their own, whereas the "darker" characters absorb that light within themselves.
In "Proteus," Stephen is watching his shadow on the beach, and he wonders why it doesn't stretch to the stars. It being day, he wonders where the stars are in the sky, and in the process gives us a great image for the way that darkness functions in the novel. He says, "His shadow lay over the rocks as he bent, ending. Why not endless till the farthest star? Darkly they are there behind this light, darkness shining in the brightness, delta of Cassiopeia, worlds" (3.78). Stephen and Bloom are like stars during the day, "darkness shining in the brightness," and it is not until night falls that they will be fully revealed.