Determining exactly when humans began wearing clothes is a challenge, largely because early clothes would have been things like animal hides, which degrade rapidly. Therefore, there's very little archaeological evidence that can be used to determine the date that clothing started being worn.
There have been several different theories based on what archaeologists have been able to find. For instance, based on genetic skin-coloration research, humans lost body hair around one million years ago - an ideal time to start wearing clothes for warmth. The first tools used to scrape hides date back to 780,000 years ago, but animal hides served other uses, such as providing shelter, and it's thought that those tools were used to prepare hides for that, rather than clothing. Eyed needles started appearing around 40,000 years ago, but those tools point to more complex clothing, meaning clothes had probably already been around for a while.
All that being said, scientists have started gathering alternative data that might help solve the mystery of when we humans started covering our bits.
A recent University of Florida study concluded that humans started wearing clothes some 170,000 years ago, lining up with the end of the second-to-last ice age. How did they figure that date out? By studying the evolution of lice.
Scientists observed that clothing lice are, well, extremely well-adapted to clothing. They hypothesized that body lice must have evolved to live in clothing, which meant that they weren't around before humans started wearing clothes. The study used DNA sequencing of lice to calculate when clothing lice started to genetically split from head lice.