Abarim Publications' online Biblical Hebrew Dictionary
There are two different roots עין ('ayin), or so it seems. HAW Theological Wordbook of the Old Testament and BDB Theological Dictionary both state that the connection between עין ('ayin) meaning eye and עין ('ayin) meaning spring or fountain is uncertain, and perhaps that is true from an etymological perspective. In practice it's no real miracle that these two words (may have) evolved into the same form since both an eye and a fountain produce water.
- The noun עין ('ayin), meaning eye, produces the verb עין ('in), meaning to eye (1 Samuel 18:9).
- The identical noun עין ('ayin), now meaning spring or fountain, produces the noun מעין (ma'yan), also meaning spring.
HAW Theological Wordbook of the Old Testament submits that by the word עין ('ayin) more than just the eye itself is implied. "Occasionally it represents the whole process of seeing [ . . . ] of understanding and obedience. [ . . . ] The eye is used to express knowledge, character, attitude, inclination, opinion, passion and response".
It seems that the role of eye in the Bible is to produce things, just like the fountain. After all, when the mind experiences pain, the eye will produce water, as Solomon writes in Ecclesiastes 1:18, "in much wisdom there is much grief, and increasing knowledge results in increasing pain". Jesus even says, "He who believes in me, as the Scripture said, 'From his innermost being shall flow rivers of living water.'" (John 7:38).