The age that it is inappropriate for kids to run around naked is around 2 to 3 years old.
Most kids by age 3 will sometimes become embarrassed about being naked around others and even being just a diaper in public or around others or their underwear.
My 3 year old son stopped running around naked when he turned 3 years old and before that he would strip his diaper off and wouldn't care.
By age 3 he stopped stripping his diaper off and would even fuss about being in just his diaper around others and in public.
Or even when I would change his diaper he always wanted privacy so I had to take him into a bedroom or the vehicle or public bathroom to change his diaper and if I didn't put shorts or pants back on him he would throw a tantrum.