This is to a great degree a matter of personal opinion. I would imagine that answers to it are likely to vary based on one’s interests. As a teacher of history and not of literature, my own feeling is that it is possible to write and to understand the history of a country or region (or time period) without any serious knowledge of its literature.
My main reason for saying this is that it is very difficult to identify what counts as “literature” for a given area or time and it is difficult to objectively say what that literature says about the time or place. If we were to look, for example, at the United States in the 1920s, what books would qualify as “literature?” Would it be The Great Gatsby or would it include the “pulp fiction” that was popular at the time? Perhaps more importantly, how do we know what either of those types of literature says about that time and place? It is impossible to know how the average person understood The Great Gatsby in that time and place. It is impossible to know if the average person believed that it was representative of what was happening in America in the 1920s.
I would argue that it is simply too hard to objectively “understand” the literature of a time and place in a way that makes literature indispensable to the writing and teaching of history. (I do understand, though, that I am biased since I am not a particularly literary person.)