It's always difficult coming to a debate like this when so many of the points which I thought of initially when I read Peter's post have already been addressed so well. Alan's point about the memorability of material (
how tuneful is it?) is very well made and certainly I think is very relevant amongst the listening public. Martin's about the satisfaction to performers of playing a particular work had never occurred to me but I can quite see now that it has an important role to play in deciding a composer's eventual fate. As a choral singer in a modest combo, I can certainly empathise with it. There are works which audiences love and we dislike signing. The conductor soon gets the message and drops them from our repertory.
My contribution to this discussion is going to be rather woolly, I'm afraid. Let's forget about the also rans who were always going to be also rans (no, no nominees from me

) and also the towering geniuses who were always in the end going to be recognised, no matter how long it took (Schubert might be a case in point). Consider the composers on the margin, those highly competent craftsmen who, from time to time, managed to produce a work, or a whole series of works which rose above the technically skilled and exhibited a touch of genius. Maybe Saint-Saëns and Raff might be a good pair to look at. Personally, I'd rank them pretty much on a par, maybe Raff on a slightly higher plane, but I'm not going to argue about it.
So why is Saint-Saëns still played quite frequently and his Organ Symphony is a concert staple, when Raff even now has to struggle for a hearing and his two greatest symphonies are still largely unknown?
I'd contend that it's mostly luck. Saint-Saëns had the luck to be born in France and so became the only really significant orchestral and chamber music composer in that then opera-obsessed country. France needed Saint-Saëns. Raff had to compete with Brahms, Wagner and a host of other similarly excellent composers in the German-speaking world which, in consequence, culturally didn't need him. Saint-Saëns had the luck to lived a very long life (he died in 1920 or so) and, although his reputation had declined around the same time as Raff's, the fact that he was still around meant that his music carried on being performed. Raff was dead at sixty, just as
his reputation went into cyclical decline and suddenly there was no reason to perform him any more. Saint-Saëns outlived the rise of nationalism in music and lived long enough to see a return to his brand of classicism. Raff, just a smuch a classicist, died just as nationalism in the shapes of Tchaikovsky, Dvorak and Grieg arrived on the scene to make his music look very staid. Saint-Saëns had the luck to have successors whose compositions were not much of an advance on his own, whereas Raff's symphonies were eclipsed by Brahms' and his stylistic ethos was overtaken by the New-German chromaticism of Liszt and Wagner. Raff had the ill fortune to be caught in the political no man's land between the Liszt-Wagner camp and the traditionalist camp, whereas in France Saint-Saëns could stay out of the debate more easily. It was Raff's misfortune to be born poor and stay poor for most of his life, so he had to write many pot-boiler piano and duo works to keep the wolf from the door. This damaged the standing of his more "serious" music. Saint-Saëns was born into a prosperous middle class family and money doesn't seem to have been too much of a problem, so his oeuvre is untainted by the whiff of the salon. And so on...
I don't want to labour the point and no doubt holes could be picked in my argument, but in essence I'm saying: tough luck. Posterity's verdict is undeserved in some cases and we do our level best to put things right, but in the cases of many fine unsung composers we shouldn't look for anything more complicated than bad luck.
Peter asked how an unsung composer was defined and Alan answered. I can say where the phrase came from. My son Edward, who is a very bight fellow, coined it when I asked him to describe the sort of composers I'm interested in, eager as I was to avoid pejorative words or clumsy phrases like "unjustly neglected" or "forgotten". I liked it's terseness, aptness and the pun...