He was invaluable as a spy.
As a double (triple, quadruple) agent, Snape served two purposes:
As an Order agent in Voldemort's ranks, he could pass information about Voldemort's plans to Dumbledore and the Order.
Since Voldemort believed him to be a spy for him in the Order's ranks, he could pass false information about the Order's plans to Voldemort.
Both of these are extremely important roles in espionage. The secret of all warfare is knowing the enemy's plans while keeping your own hidden, so as to keep the element of surprise. The two-way flow of information through Snape gave the Order a much-needed advantages over Voldemort.
"All war is based on deception" -- Sun Tzu, The Art of War.
After Dumbledore's death, he was the most direct link between the late Headmaster and Harry. He was the person who, on instructions from Dumbledore's portrait, conjured the Patronus to lead Harry to the sword of Gryffindor.
He also used his position as a double agent during this time to subtly protect the students at Hogwarts while seeming to be terrorising them on Voldemort's instructions. Using his power as Headmaster, he kept the Carrow siblings under control and ensured many students were given 'fake' punishments such as being sent into the Forest with Hagrid.
Not really relevant to the main point of your question, but as @Ellesdil pointed out in a comment, Dumbledore's reasons for having Snape kill him were considerably more than just for the latter to gain Voldemort's trust:
"Ultimately, of course, there is only one thing to be done if we are to save [Draco] from Lord Voldemort's wrath. [...] You must kill me. [...] I ask this one, great favour of you, Severus, because death is coming for me as surely as the Chudley Cannons will finish bottom of this year's league. I confess I should prefer a quick, painless exit to the protracted and messy affair it will be if, for instance, Greyback is involved - I hear Voldemort has recruited him? Or dear Bellatrix, who likes to play with her food before she eats it."
-- Dumbledore, HP and the Deathly Hallows, Chapter 37: The Prince's Tale