It depends on the context. "Can" implies basic ability, and "know how" implies a learned skill. If a person has not learned how to write, then the person "doesn't know how to" write, and the person also "can't" write. If a person does know how to write, though, they still might not be ABLE to write, for various reasons.
For example, if a person has a broken arm, you can ask, "Can you write?" The person will understand that you're asking whether they can write with a broken arm. You're not asking whether the person has learned the skill of writing.
However, you could also ask a four-year-old child, "Can you write?" In this case, most people would assume that you're asking whether or not the child has learned how to write letters and words. The meaning is the same as "Do you know how to write?"
(Edit: looks like Jerry got to this one before me. :)