Normally it is the other way round.
When a laptop is connected to the mains it works on "full power". So the screen is at maximum brightness and the CPU and other devices work at full speed.
When you pull out the mains lead and the laptop works on battery the laptop then dims the screen and slows the CPU and other devices down so they use less battery.
However this can be controlled in the "Power" setting on a laptop. Have a look for "Power options" or "Power settings" in the Windows control panel.
There is some info on power settings here, though you may need to look around for your version of Windows as you don't bother to tell us what Windows release you are on (or even if you are running an Apple Mac laptop)
http://www.howtogeek.com/howto/9090/learning-windows-7-manage-power-settings/