I don't remember the story's specifics that well, but I do remember the gist of it and what the author is trying to communicate.
Basically, the author is trying to communicate that beyond religion, race, and any other factor that might make people different from others, we are all the same, regardless of those factors. This is the main metaphor of the fence, which divides the world into two and separates the members of the concentration camp from the outside world.
Through Bruno and Shmuel's friendship, we get to see that, even though their situations are wildly different, they become best friends and don't see themselves as different from one another. Shmuel didn't become friends with Bruno because of the material possessions that he had, nor did Bruno become friends with Shmuel out of sympathy. They became friends because they genuinely wanted to be friends with one another.
In short, everyone is the same, no matter who they are, what they believe, or what factors about them make them different to others on the outside.
I recently read this book. The message that the author of this book is trying to convey is that we are all the same. Also, the fence represents the boundary that people commonly place between themselves and others based on race, gender, religion, etc. When Bruno puts on the pajamas, this represents how such a little change can make the biggest difference.