I wrote an essay on the utility of a Marxist account of history a while ago, I've tried to rework it to more directly fit your question.
Any overarching theory of history such as Marx's historical materialism suffers the same weaknesses as other overarching historical theories such as the Whig interpretation in that by studying the general rather than the particular, patterns can emerge to fit any hypothesis, essentially 'the bounty of the past provides individual instances in plenty to support virtually any proposition' (Tosh) as it strips out the relative uniqueness of events, with each having a wide range of hidden causes that are endlessly debated. Simplifying not just one event but a whole strand of events into one root cause creates a distorted and potentially incorrect view of the past.
Events should instead be studied as micro-narratives, rather than the meta-narrative of universal histories – studying large swathes of history to create an overarching causation narrative serves more to obfuscate the unique realities of historical events than to create a viable narrative. Historical events may have similarities but history does not repeat, and it cannot be treated as doing so, using examples that seem similar in their generalities are often not when investigated in detail. Creating a meta-narrative that is blind to differences in detail creates a flawed system. Because of this the Marxist account can often lead to a simplistic or even incorrect understanding of historical events due to the subordination of historical causation solely to the economic cause – production – and all other potential causes as a consequent of the economic.
The problem of a lack of sources for certain periods that definitively illustrate the cause of events allow for these theoretical approaches to insert themselves based on limited evidence, without a careful eye these could lead to a flawed account marred with excessive presupposition and false-hypotheses. Theories of history risk breaking down into mere fiction for the sake of easy communication and the fulfillment of a preconceived idea, it risks its credibility, and it can degenerate to a point where it is no longer history but fantasy. This does not disqualify the marxist account of history from being utilised, but it illustrates that the Marxist framework must be used carefully and with sufficient predjudice and forethought as to counteract these pitfalls.
The determinism of Marx manifests itself in the periodisation of history into three (later more) distinct periods each characterised by distinct modes of production – ancient, fuedal, and capitalist. Marx predicted that capitalist society would give-way to a socialist society in which the means of production would be placed in the hands of the workers, resulting in the 'self-fulfillment of mankind'. This teleological approach towards the ultimate goal of a classless society is flawed for a number of reasons. First, a teleological approach assumes that our current stage of civilisation is automatically better than our predecessors, this is flawed both in that it is not necessarily true – it is almost impossible to measure objectively without bringing in our own contemporary prejudices – and it skews our thinking and understanding of past societies
The inevitability aspect of Marx's general account is problematic because it removes human agency, the idea that humans can think for themselves and can mold history. Human behavior is sometimes erratic, he is an 'irreducible subject, the one nonobject in the world', by denying the existence of human agency the marxist view relegates humanity to a passive object, watching their own history but powerless to affect it. The reliance on general patterns in history and the emphasis on economic factors, particularly class struggle, deny these erratic and often accidental blunders of humans, and the unpredictable personalities of the ruling classes.
The problem comes not in determinism itself, but the idea of progress and human agency. There is no definition of progress, it differs from person-to-person and so any reference in historical works is dubious at best. The apparent denial of the human factor in the Marxist theory and the teleological approach is a fundamental flaw, any use of the theory without some compensation for other factors will create an incomplete narrative.
For the most part, the simplistic Marxian general history that has little room for human agency is 'vulgar-marxism', a form of historical materialism that followed in the wake of Marx, but took a simplified path that often misunderstood or misinterpreted Marx's writings. This vulgar-Marxism that masquerades as the words and works of Marx is important to note and criticise. Vulgar-Marxism follows Marx's theories in part, though not the intended spirit. Nevertheless, they are very much apart of the conception of historical materialism, regardless of its true message.
Marx's theory is also not the completely rigid narrative as vulgar-Marxism portrays it as however. Engels denies that 'the economic element is the only determining' element in history, stating that the superstructure – rituals, the state, culture – can also 'exercise their influence upon the course of the historical struggles'. While class is still the prime motivator Engels allows for other factors such as religion or culture to play a part in forming historical events rather than a purely economic basis. This serves to expand the utility of the Marxist account, allowing it greater credibility and flexibility in its conclusions, effectively it removes the simplistic element present in vulgar-Marxism and at the same time reduces the tendency to form a conclusion based on a preconceived hypothesis.
Individuals can have agency under the Marxian system in as much as they are representatives of their own age, 'what he does is the heart and essence of his age; he actualizes his age'. Individuals have free will but act in a certain predictable manner because they are representing the greater social forces that have informed their thinking and their actions. Napoleon didn't make decisions in a vacuum, he did so with the forces of his age, with economic reasoning, with cultural, with moral, and then finally with his own personal reasons. The factors that influence an historical figure are of far greater interest to history than any singular personality traits of a single man. Agency exists in the model but this is informed – at least in part - by economics. A person is free to act but it cannot be guaranteed that the consequences of the action will be that of which the person of their own free will initiated. In the words of Marx, men make their own history, but they do not make it just as they please
Due to the differences and contradictions in Marx's writings the legacy of Marx's general account of history is one of diversity. There is no one orthodoxy in Marxist writing, which has in part helped in its longevity as it is able to change its interpretation of Marx's work based on current historical trends – such as for the large part dropping the emphasis on imminent revolution and teleology at least from prominence. Marx's general account has spurred many fields, chief among them social and economic history. His emphasis on the proletariat and their relationship with class and the modes of production helped open up and create emphasis on history from below, these social histories combined with his contributions to economic history are possibly Marx's greatest contribution to history via his general account of historical materialism. By opening up new fields of study Marx has helped facilitate an enriched understanding of the world outside traditional areas of study.
Marx's historical materialism can be a useful utility for studying history if taken piecemeal, rather than as a whole theory. In its form as vulgar-Marxism it has little to recommend it over the similar Annales school in France which developed a social and economic focus largely independent of Marx's influence. As a whole vulgar-Marxism is too deterministic and simplistic for contemporary historiography, while it was perhaps a necessary evil in the immediate wake of Marx due to the contradictory nature of Marx's writing and infancy of the field it is now nothing more than an anachronistic throwback. The actual intent of Marxism is more acceptable but still objectionable in its utility. It still holds the teleological aspect, and still remains a grand narrative – albeit a much looser one – which reduces its utility as a whole; grand narratives remain out of favour in historiography and the teleological approach while given less prominence is still a hallmark of the theory. That is not to say it is completely without merit, certainly there is value in suggesting that history is abound with instances of men oppressing other men, and class can be a quite profound and effective approach to the study of a time period, but Marx goes too far in making economic factors the most prominent. Certainly, one of the greatest results of the marxist account is that it has forced academics to look inwardly at their subject and to look at their research methods, which while the end result might not result in an adoption of Marxist thought, it is useful in that it forced a re-evaluation in the minds of many historians. If Marx's general account of history is instead broken down into its fundamentals then it becomes far more useful. Stripping away the grand narrative, the teleology, and the determinism and leaving it just with the historical research methods leaves the Marxist view as wholly utilisable, as long as the 'doctrinaire marxism' that Elton describes is ignored then Marx's framework is perfectly acceptable. At this point though, such a stripped away theory is no longer Marxism.
Summary: It's a doctrinaire approach that leads to simplistic, teleological grand-narratives. If you strip that away however to just the historical research methods and use it as just one tool of history in conjunction with others then it's pretty darn useful - though at that point it's no longer really Marx's theory.