"can't" is rather informal, and should never be used in formal speech or writing, like in an essay or a documentation.
"cannot" and "can not" differs only in a way of saying them, people usually use "can not" when they want to emphasize the "not" part, both in writing and saying. Also, I found that british use "cannot" in writing a lot more than americans, but that can c