When the laptop is on battery, Ubuntu dims the display if it is idle for a while. Note that this is different from another setting, which turns off the display if the laptop is idle for a while. This idle time period before dimming can feel quite short for people who are reading something on the laptop. There are two ways to fix this:
You could turn off this dimming feature. Go to System → Preferences → Power Management and choose the On Batter Power tab. Turn off the option Dim display when idle.
Open up a terminal and type gconf-editor to open the GNOME Configuration Editor. Choose /apps/gnome-power-manager/backlight. Change the idle_dim_time to a value you like. This field is in seconds.
Tried with: Ubuntu 10.04 (Lucid Lynx)