Skills use "уметь" (to know how to).
"Я могу писать" means that you physically can/may. Or not. And it is not very idiomatic to say that when meaning that you can write in general. If you mean it being possible to write some specific thing, using «писать» is not recommended because it is has the wrong aspect for that.
To sum it up:
мочь is mostly used for actions you can perform (and is very good with perfective verbs for that). Works for physical ability or inability to do something, too ("Even recovered, he still cannot walk").
уметь is what is typically used with skills to perform some actions
«Уметь» is about an ability or skill. It means "can, know how to". We often use "to know how to do something" in our translations but in English you may also use "can" just as easily.
«Знать» is about possessing knowledge ("to know"). You can use it with languages, which is not as common in English (in English "speaking" languages is a more popular way of saying this).
English does not really differentiate between possibility, physical ability and skill. The verb "can" is usually enough. We can use "is able to" and "knows how to" in our translations—but both are not as common as "can".
Besides, "knows how to" may cause a learner to write "знает, как" which does not mean what you think it means.
I would offer that a reasonable translation of this could also be, "I am/I'm literate." At first I thought it might be a bit of a reach, but Duo also suggests "is thirsty" for words that literally translate as "wants to drink" (which I contend is not absolutely a matter of thirst), so I wonder if it's not as long a shot after all.
Just a suggestion! :D
I believe that the former is perfective (to write something to completion), and latter in imperfective (to be in the process of writing something right now).