Colour: The formality of a shirt is determined by the amount of white in the shirt's background. More white in the background of the shirt makes a shirt more formal. Solid colour shirts are the most formal with white being the most dressy. This is because in a formal environment (which is typically dark) white will offer the greatest contrast with a dark necktie.
For less formal occasions, consider blue shirts. Solid blue shirts flatter the face more, with medium blue in particular bringing out the skin's rich tones. When picking a particular hue, find a mirror and figure out which hue of blue highlights the face the most without distracting from it.
Men with a high-contrast complexion should pick a deeper tone of blue while those with a more muted complexion should pick lighter blue hues or blues with a white pattern that dampen the colour.
Men with very little skin contrast -- typically brown or black skin is needed -- can wear cream or tan shirts while pink shirts are perfect for those with a fair, rosy cheeked complexion. Yellow and orange shirts look good on men with a low contrast complexion, but should never be worn by those with sallow skin. They look particularly good with navy and brown suits.
Pattern: White stripes on a blue background look good on most people. Red checks or stripes flatter those with a ruddier complexion while yellow patterns work well for blond, fair men.
Shirts with white backgrounds look particularly good with contrasting white collars. Try and find a shirt with a club collar if you're going to wear a contrast collar shirt. These shirts should always be worn with cuff-links.
The most important thing to remember is that the pattern of your shirt should contrast appropriately with the background based on your complexion. Those with high-contrast complexions should have high-contrast patterns while those with low-contrast complexions should stick with low-contrast patterns.