The history of human nakedness is long and complex and there is not universal agreement about all of it, in part, because ancient clothing does not fossilize, making it very difficult to determine when people actually began wearing clothes. That being said, good scientific evidence, thanks to genetic research on clothing lice (of all things), points to the fact that humans have lived the vast majority of our existence naked and unashamed.
The general consensus is that because humans first evolved in Africa, where the temperatures are warm, clothing was not necessary. It was not until the ancestors of today's modern humans began migrating to colder climates that we began covering ourselves, in order to protect ourselves from the cold. However, it was not the need to keep warm that caused humans to begin being offended by the naked body. That was something more insidious: social hierarchy in general and slavery specifically. The time period when naked shaming really took hold was the Victorian Era.
Prior to the 1800's most cultures, including those that generally wore clothing, accepted public nudity. Even if people generally did not parade around naked in their daily lives, public nudity was considered normal and natural in a variety of settings. From Australia to Iceland and everywhere in between people embraced the human form as something to not just accept, but to embrace and celebrate.
During the Victorian Era, however, European culture took one aspect of clothing to an extreme: using clothing to express one's economic status. While this hierarchical use of clothing is common throughout many cultures (i.e. certain cloths are, in many cultures, reserved for special classes of people), the Victorian Europeans took class and clothing to new extremes. The more extravagant the clothing, the higher a person's social status.
In the clothing hierarchy of the times, nakedness was associated with those at the bottom of the economic food chain: the slaves. Nakedness has been inextricably linked to slavery in European society ever since. And, since slaves were equated to being "less than human" (as is typical of cultures that oppress people into slavery), nakedness became conflated with "animal," "low-class," "trashy" and a host of negative associations. Our very bodies - the vessels with which move about in our daily lives - became "unholy" things of which we were taught to be ashamed.
The good news is that it has been proven that people can quickly and easily learn to drop their body shame, simply by getting naked with other people. Getting naked is not just fun. It is healthy for the body and mind. If humans have anything to be ashamed of, it is our history of slavery, not our bodies.