Well, if the key's length is the same as the plaintext, and the key is truly random, then that's the best encryption possible. If I remember correctly, it's called "One Time Pad", and it is being used in special cases.
However, it is not commonly used as a standalone encryption because:
1. You can use a key only once (otherwise you have security problems by xoring two codes)
2. You must think of a secure way to exchange the key with your partner (obviously you can't use XOR encryption to do this)
3. A hacker can easily modify the message even though he can't crack it, and you can't tell whether the message was modified