Most likely,
the cook killed him using an untraceable poison that was engineered to be indistinguishable from a heart attack.
A key point is
the timing of the incident. Why now? Because he'd just returned home, permanently, after being stationed overseas for many years.
The motive was
a combination of international espionage and jealousy.
Though not explicitly stated,
we can deduce that the husband was a relatively high-ranking officer in the army, and thus privy to classified intelligence.
Several lines of evidence point to this:
They have enough money to dine at the best restaurant in London.
He seems to have been a career military officer.
The wife is upper-middle-class-looking.
He speaks multiple languages which suggests education.
For a British military man to have active stints in both Africa and an Indian/Pakistani conflict, it's most likely the Mau Mau rebellion in Kenya in 1952-60 and the Indo-Pakistani war in 1947. (Making present-day in the story circa mid-1980s.) And in the 1947 war, only British officers played a major role. If he was an officer that early in his career, it suggests he would be fairly high-level by now.
Which makes him a
target for espionage.
Meanwhile, the wife knows
the cook is the culprit, but is afraid for her life and ashamed of committing treason, and so can't go to normal authorities.
Because
the cook was a spy (possibly Pakistani) who was tasked with turning the wife into an asset as a means of stealing British state secrets from the husband.
There are some clues to this effect:
A domestic servant will likely have (at times unsupervised) access to the home.
The cook shows up after 10 years of marriage, when the woman is in her mid-30s, the at-home wife of an absent military man, and vulnerable.
He's young enough to be her son and is a wonderful cook, which is basically wife-bait.
At this point, the husband would be well into his career and likely to have access to more significant intelligence.
So the cook then
seduces the wife and they begin an affair. Once she is in love with him, he begins asking her to do small favors such as asking her husband about troop strengths and movements, then larger favors like acquiring documents until she begins to become suspicious.
But he didn't count on
falling in love with the wife himself. Once she eventually confronts him, he admits he works for a foreign government, but takes a carrot (their love) and stick (revealing the affair) approach to get her to continue supplying information.
So for over a decade they
continue to be lovers and partners, and the cook continues to gather intelligence for his government.
Until
the husband tells her that he's returning home under the guise of retirement to take a leadership position in British Military Intelligence, having acquired (this being the mid-80s) key information about Pakistan's attempts to nuclearize.
Note that she slips up and tells Sherlock she used the past tense "was" because he's dead when it would've made more sense to use it because he's retired. That's because in fact she knows that he's not actually retired.
She tells the cook
about her husband's new job and his return. The cook is conflicted, because he may get access to new intelligence, but he is pained at losing his life with the wife to a now-present husband.
After the husband returns,
the cook bides his time for a week, until he's forced to cook the husband and wife meals while they "take a rest all day" ;) and his jealously boils over. Then, while the married pair are at the restaurant, he discovers that the husband has not yet turned over the documents on Pakistan's nuclear program to HQ, and decides to kill two birds (or one man) with one stone.
After they return from the restaurant,
the cook indicates somehow to the wife that they need to talk, perhaps a pre-arranged signal. During the movie, she's obviously distracted and nervous, and so doesn't pay attention to things like the title and just agrees with everything her husband says.
Once the husband falls asleep,
the wife sneaks from bed and lets in the cook, who implores her to run away with him, because if not terrible things must happen. She refuses, and their arguing wakes the husband. Though it's a bit odd, he's not all that surprised to see the cook there, since the cook is like a son to them. The husband tells the wife and the cook about his dream of his time in Africa (another slip up she makes talking to Holmes) while the cook makes him a cup of tea.
He drinks
the tea, not realizing it is poisoned, and collapses, clutching his chest. The wife immediately realizes what the cook has done, and his brutal side is revealed to her for the first time. He again asks her to run away with him, but horrified by his calm demeanor and her dead husband on the floor, the wife refuses and breaks down in tears.
The cook
moves the body to the bed, and tells the wife that he must leave. He informs her that the poison was developed by his government for covert assassinations, and breaks down fully in a matter of hours, so she should wait until the morning and then call the authorities. The husband's death will appear to be an accident. The cook turns to her with a darkness in his eyes that terrifies her, a wordless threat, and departs.
So in the morning,
after not sleeping and spending hours running scenarios in her head, she deliberately calls a doctor rather than police or an ambulance (which would arouse more suspicion). She calls a doctor who she knows will take a while to get there, so she can still claim to have called immediately after waking up while allowing a bit more time for the poison to break down.
So now
her husband is dead, her lover is a killer who may kill her, and she has nowhere to turn because going to the police would mean admitting her role in divulging state secrets, and also likely open her up to assassination as a loose end.
She has no hope left, and she needs
someone who can figure out what happened to her husband without necessarily revealing it to the authorities. So with one last roll of the dice she goes to Sherlock Holmes, who is known not only for solving crimes but also for discretion and an often antagonistic relationship with the police and government.
During her meeting with Holmes,
she gives him just enough to entice him to take the case and push him in the right direction but, remembering the dark eyes of her former lover, can't reveal too much. She's terrified that the cook could be anywhere, even listening, and doesn't dare tell Holmes directly of his involvement, but does mention specifically that he couldn't have been "bribed" to kill her husband, leaving other motives open rather than simply saying "he would never kill him."
Her final remarks of "I have no hope left. I think someone murdered him, he had enemies who have access to military level tech. They must have killed him for something. Please help me." are
as close as she can come to telling him what happened, and of course how would she know he had enemies with high-level tech access anyway, unless she'd been poking around in his business.
Now,
her only hope is that Sherlock can somehow deduce what's happened, eliminate the cook as a threat, and retrieve the stolen documents about Pakistan's nuclear program. Lucky for her, he can!