If you’re using the Pi’s HDMI port and you’re running Raspbian, you’ll want to make a minor change to the config.txt file.
HDMI, Configuring Your Pi for
After booting your Raspberry Pi and responding correctly to the username and password prompts, enter:
sudo nano /boot/config.txt
To boot with maximum HDMI compatibility, use your Down arrow until you come to the line:
Delete the hash sign (#) at the beginning and make sure the value to the right of the equals sign is 1. Now press Ctrl+O to save and Ctrl+X to exit nano.
To reboot, enter
and your new settings should take effect. If your display still looks odd, you can try adding
For other types of displays and additional video settings, check out the Video section in the Raspberry Pi wiki at eLinux.org.