The opening verses of John’s gospel are clearly alluding to the account of creation in Genesis 1. Compare John 1:1-5 with Genesis 1:1-4. As I have already commented, we see that in the beginning was Jesus who is God, he created, and there was darkness. In Genesis 1:3 God creates light, in John 1:4 we are told that the life which is in Jesus is light.
This light which John refers to must be more than the light of Genesis 1:3 because Jesus is God, he is not created and John is saying that the light he is talking about is in Jesus in that it is of the life that is in Jesus — life that is uncreated. It follows therefore, that the light of Jesus is likewise uncreated, in other words, eternal.
Jesus refers to himself as being the light of the world (John 8:12). The life of Jesus is the light of men, and we also know from 1 John 5:11 that God has given us eternal life, which is in Jesus. It is consistent with John’s use of language to think of the ‘light of men’ as being the eternal life we receive from Jesus. In fact reading the entire prologue of John’s gospel (John 1:1-18) makes this quite clear.