Any chance it could be overheating? I had a similar problem on someone else's laptop (a Sony Vaio). The way the laptop ventilation was designed was a bit odd, but I found that using one of those-type airspray cans and blowing dust out (NOT further in) off and away from the fans made the machine stop shutting down.
Of course, that's if it's a hardware problem (and that doesn't even cover everything - you could have faulty memory, defective harddrive, etc.), but you might also want to make sure you don't have any viruses/spyware on your system. Just cleaned out 2 viruses off another person's computer that had been causing it to randomly shut down as well... >_<