The irony is at the end of the poem. The author spends the entire poem describing Richard Cory as the ideal man - that guy that everyone 'wants to be'. The peacefulness and 'perfectness' is further accentuated with language such as "calm", "quietly", "grace". It's a 'summer night', rather than a wintery storm.
The irony is 'situational', rather than 'comical' - that is, the expected ending does not eventuate. Here, the outcome, delivered bluntly in the last line of the poem, (Went home and put a bullet through his head) completely changes the situation, mood and feel of the poem.
The poem also uses 'verbal irony' - the meaning that is employed is sharply different from the meaning that is obviously expressed. Here, Richard is described as being "richer than a king". But richness in life cannot be measured individually by either happiness, or wealth. Rather, 'richness' is the result of a fulfilled life.