I'm an engineer and biology is my weakest point, so please forgive if this question is dumb.
Lately I've been wondering, "Why do animals that have eyes tend to have exactly 2 of them?" The closest related answer I can find is that 2 eyes provide depth perception. However:
That answer really only answers why animals have more than 1 eye; it doesn't say why animals have 2 (as opposed to 3, or more); and
Depth perception can only explain animals near the top of the food chain - wolves, bears, humans - but not animals closer to the middle of the food chain - penguins, squirrels, or fish.
Predators typically have depth perception. Prey typically do not, even if they still have 2 eyes. I'm painting an entire kingdom in broad strokes, and obviously there are exceptions. Big sharks are pretty close to the top of the food chain, but they don't seem to have depth perception. (If they can turn their eyes 90 degrees forward they might get depth perception, but only over a narrow range. I mention this because I read a statement that animals with eyes on the sides of their heads have more depth perception, but I don't see how that can be true.)
This shortcoming of depth perception can be overcome if predators evolved vision first, and then some of their descendants evolved into predators while others evolved into prey.
So here's my question:
Did (near) apex predators evolve vision first? Or, is there any evidence to suggest that that's what happened?
Complex eyes may have evolved first in predator species, specifically in box jellyfish. Trilobites are another group of animals where complex eyes may have evolved first. The trilobites covered a vast range of species in many different flavors, with variable life styles and variable diets.
The biggest question here is what is vision? If you call the sensation of light vision, then vision evolved perhaps 1.5 billion years ago (Williams, 2016) as a mechanism of phototaxis in unicellular, photosynthesizing microorganisms (prokaryotes); phototaxis being the moving towards light (Jekely, 2009). Also negative phototaxis existed early, as a protective mechanism against too much illumination. The present day relatives, tiny single celled algae, even have what you can call eyes, namely orange-colored eyespots (Fig. 1). These pigments, however, do not collect light, but block it to give direction to light. From there on evolution of vision becomes a much more complicated matter and can fill libraries.
Nonetheless, I think that's exactly what you are interested in since you are talking apex predators, i.e., I reckon, multicellular creatures, perhaps even with furry or feathered coats and clawed paws. If that is what you are looking for in terms of vision, we are further down on the path of visual evolution.
Eyes evolved multiple independent times in convergent evolution.
Almost all the vertebrates have eyes. Those few that doesn't lost their eyes through evolution and live in deep ocean of in caves where there is no light.
Going back from vertebrates into other chordates, we note that tunicates have very simple eyes in their larval stage and lose them as adults. So, it is likely that the common ancestor of vertebrates and tunicates already had eyes. Going back into the evolutionary tree, lancelets have very simple eyes and have more than two, so it is here that things start to get interesting.
Going further back into the evolution tree, we look into other deuterostomes, where we find equinodermatas and hemichordatas, which does not have eyes.
So, the common ancestor of all chordates should have primitive eyes. Those became more complex as they evolved until the appearance of the first fish.
Parallel to that, in convergent evolution, Panarthopodas (arthopodes, tardigrades and onychophora) also developed eyes and some mollusca too. So, eyesight evolved at least three times (likely much more) independently in the animal kingdom except if this was a crazy result of horizontal gene transfers (which is possible due to participation of viruses and parasites doing strange things, but still unlikely).
Also, some jellyfishes also have eyes and some nematodes and annelids also sense light, but they have no eyesight yet.
Let's focus on chordates. The primitive eyed chordate probably had a very poor and simple vision, like lancelets do today, and likely fed on plancton and detritus living in the late Eadiacaran or early Cambrian, it could also eat small invertebrates. The line between sensing light and having true eyesight is blurry, but it was crossed somewhere by an early chordate. Also, the animal kingdom was very poorly developed at those times. So, it was in fact a predator, but not in the sense that you were thinking, it was not anything similar to apex predators we have today, since even a herbivore animal is also a predator of plants. Also, the apex predator at the time were probably jellyfish, which never developed eyesight because they lack brains, only having very simple and rudimentary nerve networks.
In fact, a couple of years ago I had read out somewhere (don't remember where though) that one hypothesis about what triggered the Cambrian explosion was the evolution of eyesight in animals starting an arms race. This could make many animals orders coevolving really fast or become extinct, and even plants would also quickly evolve spines, toxins and thick protective coats against better herbivores, leading to a Cambrian world much different than the previous Eadiacaran world.
So, no, the eyes didn't evolved into a predator because it was a predator. The first eyed animals had very poor eyesight without any depth perception. It likely evolved firstly to avoid the sun, or to locate the sun and floating algae, avoid dangers (including predators) and to better locate food (which is not the same thing as hunting, since searching for cabbage is not what people would call as hunting). But once it developed, it started to evolve quickly both for predators and prey.
After the first fishes appeared in mid-Cambrian, those who tended to be prey needed to scan the environment better to detect, evade and hide from predators and they did that by gradually moving their eyes to the sides of the head. Those who were predators, needed to attack the prey precisely in order to ensure it won't escape, evolving better depth perception with binocular vision which is better done by having both eyes in the front of the skull. Invertebrates with eyesight did roughly the same thing. So neither the evolved first, they both co-evolved together. Or if one did evolved first, it was by a very small margin. Also, since the first sighted animals had very poor eyesight, they could not perceive depth, that only came after some reasonable eyesight was evolved.
Also, flying animals, even when being prey, also needed very good depth perception without losing panoramic vision, which they attained by having very specific head shapes. But this only happened much later, roughly into late Silurian or early to middle Devonian for insects, into the late Jurassic for pterodactyls, into the middle Cretaceous for birds and middle or late Eocene for bats.
Animals and plants without eyesight were limited in developing toxins, poisons, carapaces and spines as a defense, but some sighted animals needed to develop those too as protection from predation.