I'm assuming you're talking mostly about CPU power consumption. It turns out there's actually quite a bit of work involved in doing this from software, because modern processors use a lot of aggressive clock gating, voltage scaling, and frequency scaling to turn off or slow down parts of the chip that aren't being used. Maximizing the power consumption for a particular processor is going to depend on how well you can keep all of these parts active. To do this you need to make sure you're issuing as many instructions as you can so that the chip uses all the functional units available to you.
I don't believe that Intel or AMD make the clock gating granularity of their chips public, so you'll have to guess. The best way you can do this is to grab a microarchitecture manual and see what the pipelines on your particular laptop's processor look like. For example, you want to know how many floating point instructions you can issue per cycle, how many FP units you have, etc. Likewise, figure out how many integer units you have, how many SSE instructions you can execute, etc. Then write a really tight loop that issues instructions for all these things. You could do this in raw assembly, or you could probably make do with C and SSE intrinsics. If you hit all the functional units on the die with those instructions, you should manage to maximize the CPU's power consumption.
For multicore and multi-socket machines, you will also want to make sure you're using all the processors you have, so run an instance of your tight loop on each core.
Finally, keep in mind that other things on your laptop use power. DMA accesses can cost you a pretty hefty amount of power, so if you can design a benchmark that exercises your CPU and issues lots of DMAs, you might be able to use more power. Likewise, if you've got a wireless card, doing any kind of hefty network transfers over that will run your battery down pretty fast.
There's a whole lot of work going on now in the field of power-aware computing, and people in that domain usually try to conserve power. But, if you're interested in more details on power consumption, you can probably find what you're looking through papers at some of the power-aware computing conferences.
Hopefully that helps. Good luck. It would be interesting to see what you come up with if you attempt to write something like this.