"In him was life" is a metonym for causing everything to live. And, "light" here is a metaphor for "truth." AT: "He is the one who caused everything to live. And he revealed to people what is true about God" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-metaphor]])
Here "light" is a metaphor for what is true and good. Here "darkness" is a metaphor what is false and evil. AT: "The truth is like a light shining into a dark place, and no one in the dark place could put out the light" (See: [[rc://en/ta/man/translate/figs-metaphor]])