While I agree with much of the above, I do not think that Hopper's work is about
loneliness.
If you like and/or appreciate solitude, you would agree it is not synonymous with loneliness.
His paintings (a calendar of which I am presently looking at) are about people and places in America he has been.
Often the people are alone, but frequently they seem calm and at peace. Giving them the attribute of loneliness is projection of the viewer.
Critics who knew or studied Hopper do not point to despair as a theme he sought to present.
Nighthawks is often described as:
"that picture at the green diner with those people in it."