Background
In order to understand "the life was the light of men" I believe it is necessary to put the phrase in context with verse 3. Then a first question is where ὃ γέγονεν, the future indicative tense of γίνομαι belongs:
A: πάντα δι᾽ αὐτοῦ ἐγένετο καὶ χωρὶς αὐτοῦ ἐγένετο οὐδὲ ἕν [<--ὃ γέγονεν]
All things were made through him, and without him was not any thing made that was made.
ἐν αὐτῷ ζωὴ ἦν καὶ ἡ ζωὴ ἦν τὸ φῶς τῶν ἀνθρώπων
In him was life, and the life was the light of men.
B: πάντα δι᾽ αὐτοῦ ἐγένετο καὶ χωρὶς αὐτοῦ ἐγένετο οὐδὲ ἕν
All things came into being through him, and without him not one thing came into being.
[ὃ γέγονεν-->] ἐν αὐτῷ ζωὴ ἦν καὶ ἡ ζωὴ ἦν τὸ φῶς τῶν ἀνθρώπων
What has come into being in him was life, and the life was the light of men.
A is stronger grammatically; B is how it was understood by the earliest church fathers (and heretics).1
However, as both are plausible, this should be taken as a deliberate device because the writer intends the reader to understand both readings.
The perfect indicative is action completed in the past which has results existing in the present.2
The letter to the Romans supports attaching ὃ γέγονεν to what precedes as the primary reading:
For what can be known about God is plain to them, because God has shown it to them. For his invisible attributes, namely, his eternal power and divine nature, have been clearly perceived, ever since the creation of the world, in the things that have been made. So they are without excuse. (Romans 1:19-20) [ESV]
Man is able to perceive what was made, ἐγένετο, a completed action in the past, by γέγονεν, results in the present. That is, the primary emphasis is on the present but only because the work of creation, which required the eternal power and divine nature of God, continues to show that fact.
The Life was the Light of Men
If we assume that "life" is speaking about transcendent life, that is eternal life in God and Christ for mankind,3
then a basic explanation is one from the Cambridge Greek Testament:
καὶ ἡ ζωὴ ἦν τὸ φῶς. Not φῶς, but τὸ Φῶς, the one true Light, absolute Truth both intellectual and moral, free from ignorance and free from stain. The Source of Life is the Source of Light: He gives the power to know what is morally good.
The Greek Testament Critical Exegetical Commentary gives a more detailed explanation:
κ. ἡ ζωὴ ἦν τ. φῶς τ. ἀνθ] This is not to be understood of the teaching of the Incarnate Logos, but of the enlightening and life-sustaining influence of the eternal Son of God, in Whom was life. In the material world, light, the offspring of the Word of God, is the condition of life, and without it life degenerates and expires:—so also in the spiritual world that life which is in Him, is to the creature the very condition of all development and furtherance of the life of the spirit. All knowledge, all purity, all love, all happiness, spring up and grow from this life, which is the light to them all.
Since the Word was God, the life which came from the Word must be at least in part, Godly life, represented as light. This is not symbolism to the Torah which is light or to wisdom (i.e. teaching of the Incarnate Word) or even Greek philosophy or Philo's Logos. It a basic fact about creation (i.e. the enlightening and life-sustaining influence of the Word) which is God's nature:
...God is light in whom there is no darkness at all. (1 John 1:5)
There are some things which can be created ex nihilo, out of nothing. So, God does not need to be a sun in order to create the sun. The same cannot be said of life. Since God is living, created life cannot be ex nihilio: it must originate in God. In other words, life for man requires that from which exists only in God:
then the LORD God formed the man of dust from the ground and breathed into his nostrils the breath of life, and the man became a living creature. (Genesis 2:7)
The man became a living being when he received from the LORD God that which was not created. So the life which is the light of men is foremost man's continued existence which is from God:
He is the radiance of the glory of God and the exact imprint of his nature, and he upholds the universe by the word of his power... (Hebrews 1:3)
“Worthy are you, our Lord and God,
to receive glory and honor and power,
for you created all things,
and by your will they existed and were created.” (Revelation 4:11)
Yes there is a natural explanation for man's continuing existence after the creation of the first, but that is secondary. The primary reason is the will of God (cf. Isaiah 45:18). Moreover, since life is more than natural existence, life from God must be more than existence and in that sense it is part of the fabric of creation. Thus, because creation still shows God's eternal power and divine nature, light as wisdom or the light of the Torah, is the eternal power and divine nature of the Word, which was from the beginning with God. And life as the light of men which is knowledge of the Torah or wisdom are the secondary results of creation.
Therefore the second possibility, attaching ὃ γέγονεν to what follows reflects a "coexistent" truth. Since life is from that which was in God, "the life was the light of men" where light is seen as knowledge of the Torah or as wisdom reflects a consequence of physical life which is also from God. Just as the natural world shows God's nature, so life in man may show God's nature. But, when God gives wisdom or reveals Law, man is receiving that which was always existing. When one reads the phrase as ὃ γέγονεν ἐν αὐτῷ ζωὴ ἦν καὶ ἡ ζωὴ ἦν τὸ φῶς τῶν ἀνθρώπων (What has come into being in him was life, and the life was the light of all people - NRSV) and understands "light" as the Law or as wisdom, one is simply recognizing the fabric of creation which shows God's eternal power and divine nature in man but is not unique to man.
Physical Life
This coexistent truth of transcendent life has a natural counterpart: light. If transcendent life is the light of men, physical life is possible only because there is physical light. This introduces another aspect of life which is present in the text. Grammatically, ἡ ζωὴ ἦν τὸ φῶς = τὸ φῶς ἦν ἡ ζωὴ:
And the life was the light of men (και η ζωη ην το πως των αντρωπων — kai hē zōē ēn to phōs tōn anthrōpōn). Here the article with both ζωη — zōē and πως — phōs makes them interchangeable. "The light was the life of men" is also true.4
As with the flexible placement of ὃ γέγονεν the reader is to recognize the writer intends that both the life was the light of men and the light was the life of men are intended:
A: πάντα δι᾽ αὐτοῦ ἐγένετο καὶ χωρὶς αὐτοῦ ἐγένετο οὐδὲ ἕν [<--ὃ γέγονεν]
All things were made through him, and without him was not any thing made that was made.
ἐν αὐτῷ ζωὴ ἦν καὶ τὸ φῶς ἡ ζωὴ τῶν ἀνθρώπων
In him was life and the light, was the life of men.
B: πάντα δι᾽ αὐτοῦ ἐγένετο καὶ χωρὶς αὐτοῦ ἐγένετο οὐδὲ ἕν
All things came into being through him, and without him not one thing came into being.
[ὃ γέγονεν-->] ἐν αὐτῷ ζωὴ ἦν καὶ τὸ φῶς ἡ ζωὴ τῶν ἀνθρώπων
What has come into being in him was life and the light was the life of men.
...in him was life and the light was the life of men and again the primary reading is when ὃ γέγονεν is attached to what precedes. In fact, the secondary reading makes little sense because both life and the light are the life of men. In other words, the flexibility of text states a multifaceted truth. As the one who made all things, the Word is not only responsible for life which is light, He is also responsible for the natural light which is essential for life.
Notes:
1. C.K. Barrett, The Gospel According to St. John, S·P·C·K, 1962, pp. 130-131
2. Daniel B. Wallace, The Basics of New Testament Syntax, Zondervan, 2000, p. 247
3. Fredrick William Danker, A Greek-English Lexicon of the New Testament and Other Early Christian Literature, The University Chicago Press, 2000, p. 430
4. Robinson's Word Pictures of the New Testament