These two phrases mean basically the same thing. James uses them to emphasize that anything good that a person has comes from God. (See: [[rc://en/ta/man/translate/figs-doublet]])
This expression pictures God as an unchanging light. This is in contrast to the sun, moon, and stars that appear to move in the sky and sometimes are darkened. Alternate translation: "God always stays the same, and he does not cause darkness by changing" (See: [[rc://en/ta/man/translate/figs-simile]])