What is written discourse?
According to PTE latest Score Guide, version 8 (Oct 2017), written discourse is:
Correct and communicatively efficient production of written language at the textual level. Written discourse skills are represented in the structure of a written text, its internal coherence, logical development and the range of linguistic resources used to express meaning precisely.
This can be simply understood as effective application of discourse markers in your writing, such as "in addition, moreover, for example". However, good score from written discourse is NOT a credible indicator of sophisticated writing in this computer-based test.
How to improve writing?
From our experience, you could only achieve writing above 79+ only if you intentionally employ academic words, avoid repetition of using same words, and must not copy-paste from the sentences in "summarise written text" without paraphrase.