Is there a way to use my iPhone's camera as a webcam when it is connected to my Mac with its USB cable?
(This would be for an iPhone that has not been jailbroken.)
I remember seeing a few programs ages ago that can do it (but were never released) as well as people on Youtube saying they have - however on an unmodified iPhone, I have not seen any out of the box, easy to use (or hard to use) applications that allow you to do this.
The way Apple lock down the iPhone in order to get themselves maximum money, I highly doubt they would let you do this by default when they sell webcams themselves.
There might be a Cydia app for just this purpose, but it requires jailbreaking your iPhone. I can't give you any details because I haven't jailbroken mine (yet).