The Red Dwarf crew died from radiation while David Lister was in stasis. What happened to kill off the rest of humanity? Why is David Lister the last human being in the Universe?
There's been no explicit, in-universe confirmation that Dave Lister is actually the last human. Holly simply assumes (as explained in the tie-in novel 'Infinity Welcomes Careful Drivers') that since most species don't last even one million years, that the odds are that humanity has died out in the intervening three.
The enormity of all this was slowly beginning to sink in when Holly dropped his final bombshell. The one about the human race being extinct.
'What d'you mean, "extinct"?'
'Well, three million years is a very good age for a species. I mean, your average genus only survives a couple of hundred thousand years, max. And that's with a clean-living species, like dinosaurs. Dinosaurs didn't totally screw up the environment. They just went around quietly eating things. And even then, they didn't get to clock up the big one mill. So the chances of the human race making it to the big three-oh-oh-oh-oh-oh-oh are practically nonexistent. So I'm afraid you just have to face up to the very real possibility that your species is dead.'
You might want to note that Lister is rather more optimistic at the beginning of his journey back to Earth space.
RIMMER: Home? And where exactly is home supposed to be?
RIMMER: Earth? What makes you think there'll be any Earth, Lister? And even if there is, look what it's done to a household pet in three million years.
RIMMER: Can you imagine what humankind has evolved into? To them, you'll be the equivalent of the slime that first crawled out of the oceans.
Lister: ... Holly, plot a course for Fiji. Look out, Earth -- the slime's coming home!
And even after he's spent eight seasons wading through the debris of Earth's expeditions into space, his optimism has only waned slightly;
LISTER: Okay, Cassandra, do we ever get back to Earth? Has the human race survived?.
As far as I remember they never state it explicitly. But Holly (the ship) waited 3 Million years for the background radiation to dissipate. So the assumption is that all the other humans died out. See Wiki for details