There are numerous reports of the camera in iOS 4 failing to open. I've seen it quite a bit on my iPhone 4, but it comes and goes. While some folks are swapping out hardware, I'm not so sure this is a hardware issue. I still advise you to call Apple or visit a Genius Bar, but this appears to be a memory issue more than anything. I'm hoping iOS 4.1 will fix the problem.
What happens is that you go to use the camera on your phone, and the shutter won't open. You may see this in the Camera app, or in other apps like Facebook or Ya Gotta See This! which use the iPhone's camera. In other apps it may simply be that you can't click the button to take a pic, or the image of