This is part of an 11-month group project on Litsy to read one chapter of Harry Potter a day, and to comment on a theme each day. These posts will have spoilers. Today's theme is loneliness.
There are three lonely characters in chapter 2: Harry himself, the snake, and presumably Mrs. Figg. Mrs Figg is only mentioned glancingly, but I think a little loneliness is shown in an older woman living alone who delights in showing off pictures of her many cats. I'll focus on Harry and the snake.
Both Harry and the snake are being raised away from their natural homes. They are both kept in cages - Harry in a cupboard and the snake in a cage - and both get poked and prodded and abused (the snake through the glass). They can sense this in one another, and this is why they make an instant bond together.
What was Rowling trying to say about loneliness in this chapter? Partly that it can bring together outcasts who would otherwise have nothing in common. Loneliness can be a glue. Whether this glue creates a healthy relationship or not depends on the people. In this case, both Harry and the snake benefited from the relationship. The snake was released from captivity, and Dudley was scared out of his wits (not that he has many wits to begin with). This was a healthy relationship. There are unhealthy relationships that loneliness creates in future chapters of the book, but this post is only on the second chapter.