Steps to Downgrade the iPhone iOS4 4.0.2 !
1. Download the Firmware version 4.0.1 from HERE.
2. Backup your iPhone through iTunes.
3. Put iPhone into DFU Mode :-
(1). First, Open up iTunes, plug in your iPod Touch/iPhone to the CPU's USB port. Turn on your CPU's speaker and make sure it is loud enough that you can hear it.
(2). Hold down the Home button (top left for iPod Touch and top right for the iPhone with the screen facing you) and the Power button (located on the front bottom of your iPod Touch/iPhone) simutaneously, until the screen goes black and the device turns off. (past the red slider/slide to power off screen)
(3). Now let go of the Power button, but continue to hold the Home button. Your iPod Touch/iPhone should have turned off...