Before Jim’s ship sinks, darkness suggests calm and security. At night, there’s a “marvelous stillness.” The rays of the stars give Jim a sense of “everlasting security.” The comfort of the night contrasts with the hostility of the day. In chapter 2, the light plays an inimical role. It “killed all thought, oppressed the heart, withered all impulses of strength and energy.”
The light motif continues to align with abuse and discomfort in the courtroom scene that takes place at the start of chapter 4. Outside the court, the sun “blazed.” The courtroom itself is lit by the “red faces” of the assessors who insist on facts. For Jim, facts don’t explain what took place. Perhaps Joseph Conrad is subverting light's typical symbolism. In this context, light doesn’t illuminate; it obscures.
Although darkness isn’t uniformly positive. The ship sinks in the dark; Gentleman Brown’s name connects darkness to villainy; and Jim is killed in the dark. The darkness motif can be destructive.
Overall, it’s hard to claim that darkness and light are mutually exclusive. At night, there is light. During the day, there is darkness. When Jim is killed, it’s night; but it’s not fully dark due to the torches. In the courtroom scene in chapter 4, darkness is not absent. The court onlookers are described as “staring shadows.” Even in chapter 2, when the light is vividly portrayed as suffocating, darkness is not suppressed, since the ship emits a “black ribbon of smoke across the sky.”
In Lord Jim, light and darkness aren’t binary. The presence of one doesn’t eradicate the other. It’s as if the two motifs work together to demonstrate that the world is neither entirely dark nor completely light. In other words, there's a mixture of mystery and truth in Conrad's story.