Mac OS X 10.6: If your computer screen goes black
If your computer screen goes black, and then comes back on when you press a key or click the mouse or trackpad button, your computer or display has gone to sleep. To save energy, your computer and display go to sleep automatically when the computer isn’t being used.
You can set your computer and display to sleep at different times. Because the display wakes up faster than the rest of the computer, you should set it to go to sleep before the computer.
On some Mac computers, you can select options to reduce the brightness of the display before it goes to sleep and keep the display dimmed when the computer is running on battery power.
To change sleep settings:
Choose Apple menu > System Preferences and click Energy Saver.
Drag the sliders that control sleep for the computer and display.
If your Mac has these options, select “Automatically reduce brightness before display goes to sleep” to dim your display before it goes to sleep, and then select “Slightly dim the display when using this power source” to keep your display dimmed while using your battery.
To wake your computer and your display from sleep, press any key on the keyboard or click the mouse or trackpad button.