ny explanation as to how biological evolution (natural selection) first 'knew' that there was such a thing as light in the universe,
Natural selection cannot "know" anything. Natural selection is simply the name given to the process whereby those most critters most likely to survive and reproduce like organisms end up constituting the population over time.
As for how senses developed, let's take hearing. Sound is simply a pressure wave oscillation transmitted to the atmosphere. Every organism, including those which are completely deaf, is sensitive to pressure of some magnitude. But those organisms with more sensitivity can determine more about their surroundings so that they are more likely to find food and avoid being eaten.
Assigning human characteristics to something you don't understand invariably leads to muddled thinking. In this case, goofy anthropomorphization seems to be the complete basis for even asking the question. Part of the process of evolution is the introduction of random variations. It turns out that random variation selected by natural processes can produce results of exactly the type you ask about here.
Under a government which imprisons any unjustly, the true place for a just man is also in prison. Thoreau: Civil Disobedience (1846)
I believe that a scientist looking at nonscientific problems is just as dumb as the next guy.
Richard P. Feynman
If there is no struggle, there is no progress. Those who profess to favor freedom, and deprecate agitation, are men who want crops without plowing up the ground, they want rain without thunder and lightning. Frederick Douglass