I have kinda same problem with my phone. Sometimes it just shuts off, even when I'm surfing/typing with it.

Model: HTC Titan OS: Windows Phone 7.5

I think battery isn't working well and I'm going to buy a new one.
But the problem appeared right after the OS update (WP7 --> WP7.5) and I got the update through a glitch before the official release, and I can't update it anymore because it says its already installed.

I hope its battery's fault.