How a nerve comes to be sensitive to light, hardly concerns us more than how life itself originated; but I may remark that, as some of the lowest organisms, in which nerves cannot be detected, are known to be sensitive to light, it does not seem impossible that certain elements in their tissues or sarcode should have become aggregated and developed into nerves endowed with this special sensibility to its action.
Source: wiktionary