I recently dropped my iphone 4, and the power/lock button became very hard to press in order to get it to respond. So rather than spend $150 at the apple store, I decided to open it up and fix it myself.
Great. Disassembly was actually pretty easy, and after figuring out how to replace the functionality of the button with some tiny pieces of electrical tape, it works great now.
On the iphone 4, the power button assembly is a yellow flexible circuit board with a small black dot on top that enables the metal button to apply pressure on the electrical sensor. However, if this gets displaced, then it becomes really hard to get the sensor to work correctly. Thus, to replace it a few pieces of electrical tape stacked three-high or so on top of the circular sensor will get it working to almost-as-good-as-new condition.