Writing an essay is an art: it takes practice to perfect. But the key to writing good essays is proper preparation. Under exam time pressure, it can be tempting to skimp on planning and launch straight into writing a response. Don't do this! Take your time to interpret the question and understand its subtler implications, then draw up a detailed plan. I always advise students to go back to the text for some close reading; start by picking three relevant passages to the question at hand. What do these demonstrate about the text? What specific devices are used in these passages and what's their effect on our understanding of the question topic? How do they relate to your overall sense of what the text is about?
Asking these questions, you'll start to see the crucial linkages that will give your essay the strong structure that will enable you to secure top marks. It's important to know how you get from point A to point B. Drawing up an outline can help you better see how your essay points could fit together. It can also help you work out how you're going to work in other important things you need to comment on like context, devices and comparison. I always ask my students is to summarise their overall argument (or "thread") in a single sentence before they start writing an essay. It doesn't have to be really sophisticated or original, just clear enough to meet the criteria. It's really important to maintain consistency in your essay so that examiners know exactly what you're arguing. The final sentence of your introduction should never contradict the final sentence of your conclusion, for example.