Avian eggs differ so much in their colour and patterning from species to species that any attempt to account for this diversity might initially seem doomed to failure. Here I present a critical review of the literature which, when combined with the results of some comparative analyses, suggests that just a few selective agents can explain much of the variation in egg appearance. Ancestrally, bird eggs were probably white and immaculate. Ancient diversification in nest location, and hence in the clutch's vulnerability to attack by predators, can explain basic differences between bird families in egg appearance. The ancestral white egg has been retained by species whose nests are safe from attack by predators, while those that have moved to a more vulnerable nest site are now more likely to lay brown eggs, covered in speckles, just as Wallace hypothesized more than a century ago. Even blue eggs might be cryptic in a subset of nests built in vegetation. It is possible that some species have subsequently turned these ancient adaptations to new functions, for example to signal female quality, to protect eggs from damaging solar radiation, or to add structural strength to shells when calcium is in short supply. The threat of predation, together with the use of varying nest sites, appears to have increased the diversity of egg colouring seen among species within families, and among clutches within species. Brood parasites and their hosts have probably secondarily influenced the diversity of egg appearance. Each drives the evolution of the other's egg colour and patterning, as hosts attempt to avoid exploitation by rejecting odd-looking eggs from their nests, and parasites attempt to outwit their hosts by laying eggs that will escape detection. This co-evolutionary arms race has increased variation in egg appearance both within and between species, in parasites and in hosts, sometimes resulting in the evolution of egg colour polymorphisms. It has also reduced variation in egg appearance within host clutches, although the benefit thus gained by hosts is not clear.