Figurative language is used in literature to provide more of a mental picture or create some sort of impact beyond using language literally. Hyperbole is used when Robinson writes:
But still he fluttered pulses when he said,
'Good-morning,' and he glittered when he walked
Clearly pulses would not literally flutter, nor did he really glitter beyond what jewelry he might have worn. He did, however, cause a stir of excitement.
Robinson also uses a simile when he says
And he was rich - yes, richer than a king -
And admirably schooled in every grace
Comparing Richard Cory to royalty serves to create more of a divide between the town people and Richard Cory, and the attitude of the town people isolates Richard.
This isolation is revealed in the last line of the poem
Went home and put a bullet through his head.
The figurative language reveals the envy of the town people, and makes the isolation that Cory feels even more poignant.
eNotes has some great resourses to help with this poem.
"Richard Cory" by Edwin Arlington Robinson is a short narrative poem first published in 1897 in Robinson's book The Children of the Night. The language tends to be simple and direct; it uses fewer figures of speech than might be found in Metaphysical or Romantic poetry.
Figures of speech are defined as departures from ordinary language intended to enhance the effects of a piece of writing on the reader. They are normally divided into "figures of sound" and "figures of thought."
In terms of sound, you will note that the poem is divided into four stanzas, each comprised of four lines of slightly irregular iambic pentameter. These lines exhibit a regular rhyme scheme of "open quatrains" (normally abbreviated as "ABAB"). There are some instances of alliteration (repetition of consonant sounds) such as "worked, and waited."
The main figures of thought we see are amplification and hyperbole (overstatement or exaggeration). We can observe both of these in the following line:
And he was rich—yes, richer than a king—
First, we have the repetition of "rich ... richer." Next, we have the exaggeration of "richer than a king"; a moderately well-off resident of a small town is not actually richer than, say, the King of England. Many of the descriptions of Cory are exaggerated, helping us understand the gulf between him and the other residents of the town in wealth, social class, and personal lifestyle.