From Raspberry Pi Spy:
If you are building a Raspberry Project with screen there may be times you need to rotate the screen. This fairly easy to do in Raspbian.
Start by editing the config.txt file
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!