Clarity means clear or transparent. In the context of
writing, clarity refers to the ability of readers to easily comprehend the intended
meaning of the words that someone has written on a page. Although clarity in writing is composed of many different elements, the clarity of a sentence can be judged by how clearly it communicates its message to a reader. Therefore, you can think about clarity as an equation that "works" when what is said (what is on the page) = what is meant (what is in the reader or writer's mind in response to/resulting in the representation on the page). Of course, even this "simple" equation is quite complicated since there are both writers and readers involved in any act of written communication.
One of the key differences between written and spoken communication is that, in writing, the writer is usually not physically present to explain his or her intended meaning to a reader. Thus, the writer cannot explain and revise information instantly in the event of any miscommunication. Also, because there are several distinct stages of representation and transmission involved in written communication, the possible instances of miscommunication or misunderstanding are even more numerous than in spoken communication.