How can I find out what parts are in a Lego set?
Here are the options that I'm aware of along with some basic pros and cons:

Rebrickable

Rebrickable provides set inventories for nearly all sets. It includes sets from all time, and is still being updated as new sets come out. Rebrickable also provides all set inventories for offline use via its download page.

Bricklink Inventory Reference

Bricklink probably provides the most complete and up to date set inventory data. These inventories are also very detailed and include extra parts, sticker sheets, etc. If you are a seller on Bricklink, you can also part out sets into your inventory which could be useful to you at some point.

Brickset / Lego.com

TLG provides nearly complete inventories for sets online via the replacement parts page. You can use this to get part information from your sets, but the interface is lacking because this isn't really what the page is meant for.

Brickset provides this same part data in a format which is much better for viewing. Simply search for a set and use the "Parts" tab to view contents if they are available.

These resources have a couple of downsides:


They only include relatively new sets.
Set inventories aren't as complete as Peeron or Bricklink.


Peeron

This site is great for old sets, but it isn't updated anymore.