There's a lot of games out there that just play better with a gamepad. For example, Bastion is an isometric action title that would be rather awkward to control with a mouse and keyboard. Or how about Limbo, a sidescrolling platformer. Or maybe, like me, you like racing games but don't want to setup your force feedback racing wheel. Heck, I use a gamepad for Battlefield 3 in case I hop into a fighter jet.
Xbox controllers, being a Microsoft product, generally work on PC without any problems. Sony, however, doesn't think much of using their hardware on a MS based system so they do not provide basic support or functionality. Thankfully, some intrepid 3rd party has taken things into their own hands.
I introduce to you: MotioninJoy
Just go to the site and download the latest version. I've used these drivers for quite a while now without any issues. Basically, you just install the drivers and plug your PS3 controller into your USB input. If you have a bluetooth capable PC, you can use that too just read about how at their website.
After that, you boot up the driver tool, hit Enable, and you're good to go! I do recommend selecting the option "Xbox 360 Controller Emulator" because most games have default controls for the Xbox controller and it works great.