First things first, back up your iDevice with iTunes in case of a problem. There have been a few reported issues with this process.
Before you update your iPhone, you’ll want to grab a few updates. First update iTunes to 10.5. You’ll need that update in order to actually installed iOS 5 on your device. For iCloud features, update Lion to 10.7.2 and iPhoto to 9.2. Lion and iTunes can be updated using Software Update, while iPhoto requires you to use the Mac App Store. If you’re on a Windows machine, you need to download the iCloud control panel. Or you can skip all that and download the updates manually with the links below. And, this should go without saying BUT we’re saying it ’cause you might need us to: Back everything up first!
Windows iCloud Control Panel for Windows:
Apple – Support – Downloads