Here "lamp" is a metaphor. John displayed God's holiness in the same way a lamp gives light. AT: "John was like a lamp that was burning and shining" (See: [[rc://en/ta/man/translate/figs-metaphor]])
"Light" here is a metonym for "life" or "influence" or "teaching." AT: "willing to rejoice in his influence" (See: [[rc://en/ta/man/translate/figs-metonymy]])