The answer to your question is 'genetic linkage', the phenomenon observed
when two genetic markers (loci) are transmitted from a parent to the same
child more often than 50% of the time. The rules of simple Mendelian
genetics suggest that any two markers will assort independently of one
another, so that each functional version (or allele) of each gene has a 50%
chance of being transmitted to the next generation. When alleles are
transmitted together more often than 50%, it usually means that they are on
the same chromosome, and when they are transmitted together a much higher
%age of the time than 50%, it usually means that they are very close to each
other on that chromosome. This close proximity of linked genetic loci means
that
recombination (the creation of new combinations of alleles on a
chromosome) between these loci will be rare. The closer a pair of genetic
loci are the lower the chance of recombination.

Hair color and eye color are traits which depend on the presence or absence
of particular alleles of genes that produce color pigments. There are a
number of different genes that are responsible for eye and hair color, but
they seem to be found
primarily on chromosomes 15 and 19.
Almost all of these genes have multiple alleles which produce different
levels of color pigments. Most members of our species have brown hair and
brown eyes because most people have pigment genes that produce brown pigment
(eumelanin). However, some human populations (mostly European populations,
although some groups in other parts of the world have blonde hair) have high
frequencies of blue or green eyes, or blond or red hair. These colors are
produced by pigment genes producing yellow-red pigment (phomelanin) or other
pigments. People with brown hair or brown eyes might be producing these
other pigments, but the are covered up by the darker melanin.

It seems likely that traits like blonde hair or green eyes arose
independently in isolated populations, and since the genes for eye color and
hair color tend to be linked, the traits that arose in these small
populations tend to be transmitted together. The genes for red hair and
green eyes seem to have arisen in the ancient Celtic populations of the
British Isles, and blond hair and blue eyes likely arose in northern Europe.
These traits are transmitted together because they are closely linked on
their respective chromosomes, and because they are closely linked, that
means that the chance that an allele for brown pigment (either hair or eyes)
will recombine onto one of those chromosomes. So, if one of your 15th
chromosomes has a gene for brown hair, it is most likely that the gene for
eye color on that same chromosome will produce brown eye pigment as well,
and if the other chromosome 15 has a gene for blue eye color, it is likely
that the gene for hair color on that chromosome will produce blonde hair
pigment.

Now, there is one additional issue confounding this whole matter. Everyone
has two copies of each chromosome. This raises the question, what happens in
the example I gave above, where you have one copy of a gene for brown eyes
and one for blue, and one copy of a gene for brown hair and one for blonde?
Well, if you remember above in the discussion of different types of melanin,
darker eumelanin tends to overpower lighter phomelanin, so if you have a
situation where both types are being produced, only the darker pigment will
be visible. Another way to say this is that traits like red or blonde hair
or like blue or green eyes are recessive traits, while traits like brown
hair and brown eyes are dominant traits.

So to summarize, genes for hair and eye color are found on several
chromosomes, and they tend to be very close to each other on their
respective chromosomes. Because traits like red hair and green eyes arose in
the same population, they are found on the same chromosome. In addition,
traits like brown hair and brown eyes are dominant, while traits like red
hair and green eyes are recessive. So, red hair and brown eyes are uncommon
because there is a low chance that the gene for brown eyes will recombine
onto a chromosome with the gene for red hair, and in order for someone to
have red hair and brown eyes, they would have to have two copies of the gene
for red hair and at least one copy of a gene for brown hair.