Follow the step by step guide posted below to jailbreak your iPhone and iPod touch using Redsn0w.
Step 1: Download Links for iOS 4 (Official from Apple)
iOS 4 (final version) for your version of iPhone and iPod touch. Download links are posted here.
iPhone 3GS
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone4/061-7437.20100621.5urG8/iPhone2,1_4.0_8A293_Restore.ipsw
iPhone 3G
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone4/061-7436.20100621.58Yt4/iPhone1,2_4.0_8A293_Restore.ipsw
iPod touch 2G
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone4/061-7435.20100621.tr49t/iPod2,1_4.0_8A293_Restore.ipsw
iPod touch 3G
http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone4/061-7381.20100621.AzSP9/iPod3,1_4.0_8A293_Restore.ipsw
Step 2: Update to this latest firmware using the iOS file you just downloaded via iTunes 9.2.
http://www.apple.com/itunes/download/
Step 3: Start Redsn0w 0.9.5b5-4 and point it to the original iOS 4 firmware file to proceed.
Redsn0w 0.9.5b5-4 for Windows
http://rapidshare.com/files/401859828/redsn0w_win_0.9.5b5-4.zip
or
http://hotfile.com/dl/50072145/6fa2c4a/redsn0w_win_0.9.5b5-4.zip.html
Redsn0w 0.9.5b5-4 for Mac
http://rapidshare.com/files/401858291/redsn0w_mac_0.9.5b5-4.zip
or
http://hotfile.com/dl/50072847/199eeb2/redsn0w_mac_0.9.5b5-4.zip.html
Step 4: Now select “Install Cydia” and click “Next”.
Step 5: Now make sure your device is both OFF and PLUGGED IN to the computer before you click “Next”.
Step 6: Connect your device in recovery mode by pressing the Power and buttons continuously.
At this stage you will be presented with a screen where you will have to quickly hold “Power” button and then while holding the “Power” button, you will now have to hold “Home” button too. Now after few seconds release “Power” button but keep holding “Home” button until installation begins.
Step 7: Sit back and enjoy while redsn0w will do all the rest for you. Once done, your iPhone and/or iPod touch will restart automatically and you will find it jailbroken on the latest iOS 4 firmware.