The evolution of eyes has many fascinating components. Because
light carries such a vast wealth of information about an organism's
surroundings, the ability to sense changes in light can add greatly to an
organism's fitness. Because it is so important, sight can be used to
understand how evolution by natural selection works.

Before I describe the evolutionary principles behind your question,
I might clarify one point: many animals do not have two eyes. Some
animals, such as sponges have no eyes. Others, such as arthropods, can
have many eyes (although insects usually have two compound eyes
supplemented with more simple eyes). Also, the sightlessness of cave
animals is one of the most interesting areas of evolutionary study. Yet
your observation remains valid. Why do so many animals have two eyes?
There are two evolutionary principals at work: convergent evolution and
homology.

First let's discuss homology. Many animals have five fingers on
each limb. Salamanders, armadillos and humans all have highly divergent
types of fingers, but they each have exactly five. Losing a finger really
doesn't lower the fitness of an organism, and upping the number to six
wouldn't have a very big impact either, so why five? Quite simply, all the
organisms with five fingers are decedents of the same five- fingered
ancestor. Since the development of those five digits, the selective force
on the number of digits has been inconsequential. Instead, different types
of fingers were selected for: gripping fingers for the salamander, digging
fingers for the armadillo, and grasping fingers for humans. The various
types of fingers are said to be homologous (derived from the same ancestral
source). (For more information on homology see another MAD Scientist's
description of
pentadactally.)

This is the same process at work in maintaining two eyes for the
Chordates, which all have "camera eyes". This group includes all
vertebrates such as fish, birds, amphibians, and mammals. (Camera eyes are
eyes using lenses to focus an image.) These animals have two eyes because
they retained the trait from a common ancestor. As in pentadactally, the
eyes have been modified for different uses by different animals. Some of
these eyes are specialized for seeing at night. Some see different colors,
or only in black and white. (See this MAD Scientist's remarks about
animals with
color vision.) But the number of eyes within this monophyletic group (all
derived from a single ancestor) is always two.

You mentioned that animals with differently shaped faces would not
have the same uses for their eyes. In fact, the placement of the eyes on
an animal's face is an excellent example of homology in eyes. As a general
rule, animals that are subjected to considerable predation have one eye on
either side of a narrow face, as in thin fish and rabbits. By maximizing
the field of view, the animal can more quickly sense a predator coming for
it. Animals with eyes placed side by side on the front of the face are
predators. By overlapping the fields of view of the two eyes, depth
perception is obtained. This is of great benefit when hunting down a
running prey or judging the distance before jumping out and ambushing the
prey.

Why don't we evolve a third eye on the back of our heads now?
There are several reasons. First, complex eyes like we have are very
energetically expensive for an organism. Not only is there the physical
eye to grow and maintain, but a substantial portion of the brain has to be
devoted to interpreting the incoming signals. It's much more efficient to
simply rotate your head than to grow and maintain a whole new eye. The
other factors preventing the evolution of a new eye in Vertebrates involves
constraints of evolution. Another MAD Scientist has written in more detail
on the requirements for
evolving new eyes.

So among the Chordates, we have two eyes because we are all
descendents of a single ancestor with two eyes. But why did our common
ancestor evolve exactly two eyes? The reasons for evolution of binocular
vision in the ancestor of the vertebrates are the same reasons for
evolution of two eyes in invertebrates.

The eyes of invertebrates are not genetically related to the eyes
of vertebrates. In fact, the different eyes did not even evolve from the
same kinds of cellular structures. When different organisms evolve similar
characteristics based on similar selective forces, it is called convergent
evolution. While arthropods can have many additional simple eyes (ocelli),
many have two, more highly developed compound eyes. Why do they have two?

Having two eyes lets you compare light coming at you from two
different directions. Even when the fields of view don't over-lapped,
comparison of left and right can orient an organism. The animal can direct
itself directly towards light by turning until both eyes are receiving
equal, maximal amounts of light stimulation. Likewise, an animal can
direct itself away from light by turning until both eyes are receiving an
equal, minimal amount of light stimulation. This can be particularly
important for animals that need to stay out of the light, either because
they can easily dry out in the sun, or because they want to hide from
predators. For such orientation, only two eyes are needed.

As a point of interest, development of camera eyes similar to those
of vertebrates has occurred within a group of invertebrate mollusks called
the Cephalopods. Cephalopods include octopuses and squid. Development of
the camera eye two separate times is one of the greatest examples of
convergent evolution.

In summary, animals that have two eyes have them because of two
reasons. All vertebrates with eyes have two because the common ancestor of
vertebrates had two eyes. That common ancestor had two eyes for the same
reasons that invertebrates with eyes tend to have only two complex eyes:
two eyes are better than one because they allow comparison of light coming
from two directions, while a third eye doesn't give enough extra
information to make it worth the costs of having it.

If you're confused about how the different groups of animals all
fit together, I highly recommend visiting the Tree of Life's page on
Metazoa (animals).