There's not much information to go by there, a kernel panic can be caused by any number of things.
Did you happen to catch any error codes? If you did, try looking them up on the net, there could be a possible solution.
Otherwise, the only thing I can recommend is to keep your OS and software up-to-date.