The earliest theory I have met with is that of St. Augustine, who states (De Civitate Dei, Bk. XIV, Ch. XVII) that erections of the penis never occurred until after the Fall of Man. It was the occurrence of this "shameless novelty" which made nakedness indecent. This theory fails to account for modesty in women.
Guyau, L'Irreligion de l'Avenir, Ch. VII.