All explained in the Half-Blood Prince (emphasis mine).
“Why did you stay there all that time, Snape? Still spying on Dumbledore for a master you believed dead?”
“Hardly,” said Snape, “although the Dark Lord is pleased that I never deserted my post: I had sixteen years of information on Dumbledore to give him when he returned, a rather more useful welcome-back present than endless reminiscences of how unpleasant Azkaban is…”
[...]
“But you didn’t return when he came back, you didn’t fly back to him at once when you felt the Dark Mark burn—”
“Correct. I returned two hours later. I returned on Dumbledore’s orders.”
“On Dumbledore’s—?” she began, in tones of outrage.
“Think!” said Snape, impatient again. “Think! By waiting two hours, just two hours, I ensured that I could remain at Hogwarts as a spy! By allowing Dumbledore to think that I was only returning to the Dark Lord’s side because I was ordered to, I have been able to pass information on Dumbledore and the Order of the Phoenix ever since! Consider, Bellatrix: The Dark Mark had been growing stronger for months. I knew he must be about to return, all the Death Eaters knew! I had plenty of time to think about what I wanted to do, to plan my next move, to escape like Karkaroff, didn’t I?
“The Dark Lord’s initial displeasure at my lateness vanished entirely, I assure you, when I explained that I remained faithful, although Dumbledore thought I was his man. Yes, the Dark Lord thought that I had left him forever, but he was wrong.”
Harry Potter and the Half-Blood Prince - Chapter Two, Spinner's End
So basically a combination of factors:
- Snape explained to Voldemort that he was ever faithful to him
- Snape had 16 years of information on Dumbledore to give to Voldemort
- Snape also had information on the Order to give to Voldemort
- Snape could still remain as Hogwarts as a spy (which also means even more information), owing to the fact that he didn't immediately apparate to Voldemort when the Dark Mark burned
Why does Voldemort still trust Snape if he failed to kill Harry?
“If I had murdered Harry Potter, the Dark Lord could not have used his blood to regenerate, making him invincible—”
[...]
“Indeed, many of the Dark Lords old followers thought Potter might be a standard around which we could all rally once more. I was curious, I admit it, and not at all inclined to murder him the moment he set foot in the castle.