Edwin Arlington Robinson uses words that are associated with royalty and distance along with light/dark imagery to indicate the divide between the upper and lower classes.
In the first stanza, the speakers are the townspeople and they describe Richard Cory in kingly terms: "a gentleman from sole to crown." Further, he is "imperially slim" and "richer than a king." And, when Cory walks he "glitters." With other words that describe distance, social position is indicated by the townspeople who describe themselves as "We people on the pavement"; these people look up Cory, finding him "admirably schooled in every grace"; moreover, they envy him and wish that they were in "his place."
The poverty of the people on "the pavement" during the economic depression of 1893 is indicated by their going "without the meat" and their having "cursed the bread." With tragic irony, and to the amazement of the citizens, the wealthy, imperial-looking Richard Cory commits suicide. Cory's wealth, a source of envy, is what has separated him from the townspeople. Tragically, then, as the townspeople have searched for the "light" of relief from economic depression so has Richard Cory sought another light, that of friendship and camaraderie, one that does not "glitter," but burns warmly, instead.