The Smithsonian Migratory Bird Center has this to say:
Experiments done with Indigo Buntings have revealed one of the cues that migratory birds use to navigate: stars. Buntings specifically use the pattern of stars around the North Star. If young buntings are prevented from seeing the night sky during a critical stage in their development, they will not be able to orient properly for migration. This ability, therefore, is learned rather than genetically programmed. Other nocturnal migrants probably also use stars for compass direction.
Although the intricacies of how birds navigate remain a mystery, this much seems to hold true: all migratory birds use a variety of cues, and different species seem to rely on some cues more than others. This can vary according to the immediate circumstances, for example, if it is a cloudy night and the stars are obscured, a nocturnal migrant many rely more on other sources of information. Other cues used by migratory birds include: the earth�s magnetic fields, location of the setting sun (and the pattern of polarized light created), topographic features of the landscape (coastlines, rivers, mountain ranges, for example), and prevailing wind patterns (wind patterns are seasonal; during migration the wind tends to blow in roughly the appropriate direction for migration).