The skills demanded of a good writer depend upon the genre. I can speak with some experience on didactic writing, because I’ve written more than 30 non-fiction books and textbooks on mathematics, intelligence, and finance. However, I will only speculate on the intellectual requirements for different types of fiction.
Fiction at the highest level, such as found in the works of Shakespeare, requires a deep insight into human nature and a special talent for expressing ideas succinctly. “Me thinks she protests too much,” is a remarkably concise way of saying in a few words that her exuberant protestations belie her denials of personal interest. The greatest writers of fiction can use their insight into human nature to craft “authentic” characters that engage the reader and carry the plot to a consistent end. It would seem that great writing requires a reasonably high level of general intelligence, significant writing skill, and some acquired insights into human motivation. A professor of literature would be able to give you a better description than I of the skills required for great fiction writing.
At the low end of the fiction spectrum is the kind of formula writing found in romance novels and other light reading. The authors of those books have an instinct for what their demographic wants to read and they have acquired some skills in delivering to that market. However, it would seem that such writing would require writing skills that are significantly better than average, but would not require extremely high intelligence.
Non-fiction also has a range of sub-categories. At the low end is the writer of handyman manuals, caricatured by Bob Newhart in the tv sitcom The Stratford Inn (1982 –1990). This kind of writing, like a standard recipe book requires slightly higher than average writing skill but a high content knowledge. At the high end of non-fiction are books on quantum physics, advanced mathematics and artificial intelligence. In this genre, subject knowledge is vital and the author must have a high IQ. However, some books on these topics are turgid and opaque. What distinguishes the turgid from the readable and informative is the ability of the author to convey the essential ideas in an interesting and engaging fashion. Authors of the turgid and unreadable are probably as intelligent as the authors who write more engaging books, but they differ in writing skill and awareness of their audience.
Textbooks are an entirely different genre in the non-fiction realm, and though they may require an author with a high level of intelligence, depending on the subject, they may not require the same level of intellectual acuity as the scholarly treatise. When I was a graduate student, I asked the Chairman of the Mathematics Department at the University of Toronto, Professor Dan DeLury, why the textbooks gave more difficult explanations of the theorems than my colleagues and I were able to share. He responded, “Many authors write their textbooks for their colleagues, not for the students.” He was shedding light on the fact that textbook authors at that time were often writing books to showcase to their colleagues the span of their knowledge.
Writing a great textbook is both an art and a science. It requires someone with very high subject knowledge, and reasonably high intelligence, who also understands the needs of the learner. A top textbook author knows that most people need to learn a concept at a concrete level with several examples before they can move through pictorial representations and generalize to abstract formulations. Starting at the abstract level may appear impressive, but it loses the reader at the outset. For example, mathematical concepts like exponential growth must be displayed first in the real-world context of bacterial growth or compound interest before exponential functions are introduced. Also, the discourse must be clean and precise. The incompetent author write, “All rectangles are not squares,” while the more schooled author writes, “Not all rectangles are squares.” The first sentence is incorrect; the second is accurate. As Carl Gauss once observed, “When dealing with the transcendental, we must be transcendentally clear.”
A few years ago, I was fortunate to collaborate with a group of very talented artists and fellow authors with whom I worked on an elementary mathematics textbook program called MathQuest. We integrated creative art with entertaining mathematics to delight children and the result was a program that served 80% of a generation of Canadian students and was adopted by several school boards in America. (One of those artists, Steve Pilcher, went on to serve as production designer for the animated movie (2007) Ratatouille for Pixar.) The MathQuest series published by Pearson Education met the needs of children because it was created by a cadre of very talented people of above average intelligence, but it did not require intelligence at the highest levels of abstraction. So, the short answer to your question is that a writer should have a level of intelligence that is above average, but more importantly, the author or authors must have acquired a set of skills that are significantly above average.