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. He does not change like shifting shadows" (See: [[rc://en/ta/man/translate/figs-simile]])