Poor Walter. He's one of those characters who exists to die, like a red shirt in Star Trek. It's not just for tear-jerking purposes, though. When Walter is on his deathbed (or death rock, or whatever they lay on in these caves), he thinks that Wanda is his dead wife, Gladys. To comfort him, Wanda plays along. This gives Wanda the opportunity to show her compassion to Doc and the other cave dwellers, and it's a turning point in her relationship with the humans.
Doc ends up giving Walter an overdose of morphine to put him out of his misery. This act of euthanasia isn't a contentious issue in the caves. Pretty much everyone thinks it's the best course of action. In fact, Walter's death brings out the best in everyone. Well, except for Kyle. He uses Walter's death to make a point about how humans rule and aliens drool. When he turns a dead man's funeral into a persuasive argument, Kyle proves that not all humans are that wonderful after all.