Epigraphs are like little appetizers to the great entrée of a story. They illuminate important aspects of the story, and they get us headed in the right direction.
(Epigraph for Part II)
When from dark error's subjugationMy words of passionate exhortationHad wrenched thy fainting spirit free;And writhing prone in thine afflictionThou didst recall with maledictionThe vice that had encompassed thee:And when thy slumbering conscience, frettingBy recollection's torturing flame,Thou didst reveal the hideous settingOf thy life's current ere I came:When suddenly I saw thee sicken,And weeping, hide thine anguished face,Revolted, maddened, horror-stricken,At memories of foul disgrace.– Nekrasov
Nikolai Nekrasov was a Russian poet and contemporary of Dostoevsky. In fact, they were buddies; Dostoevsky actually gave the eulogy at Nekrasov's funeral. Don't you wish you could give your friend a pat on the back by using his work as an epigraph to your world-altering novel? (Fun fact: Dostoevsky would quote this same poem in The Brothers Karamazov. Nifty.)
But about the poem. Note that it's an epigraph to Part II, not to the work as a whole. And that makes sense, since the subject of the poem has much to do with "À Propos of the Wet Snow," Part II of Notes. And that subject is…degraded prostitutes.
OK, actually, it's more about saving degraded prostitutes. Nekrasov's poem "When from the darkness of delusion", from which the epigraph is taken, is written from a man to the prostitute he's saved. The guy is basically saying, "I lectured at you until you stopped being a prostitute, and now you get to be my wife." The wife part doesn't come in yet, since the epigraph is only the beginning of the poem, but the Underground Man quotes the last two lines when he's fantasizing about Liza showing up to his apartment: "Into my house come bold and free, / Its rightful mistress there to be."
The point is that the Underground Man is living his life according to literature, which of course is ridiculous for a man who berates foolish Romantics for being, well, foolish romantics. For more on this, read everything else we have to say on Notes.