Often as a coy or jocular enquiry are you decent?, the phrase to be decent means to be sufficiently clothed to see visitors.
Its origin is theatrical, as explained in the text in which is the earliest instance of this phrase that I have found, English in The Show World, by Homer Croy, published in The Sunday Star (Washington, D.C.) of 23rd July 1911:
“Hello! Are you decent?”
“Yes, come in.”
“Say, I’ve got some scandal. [&c.]”
No, this is not Chinese; but the great American language as it is handled by people back of the wings. To any member of the profession this is a kind of theatrical shorthand. An actor could tell you from reading this that the conversation took place in the dressing room of a vaudeville theater between two members of the cast of a dramatic sketch.
The first sentence lays the scene definitely; for it is the stereotyped question that is the password of the dressing rooms, and it means, “Are you dressed so that I can come in?” […]
“Scandal” is the small talk, or news. It is often used, of course, in the proper sense; but the usual happy go lucky meaning is small talk or gossip. [&c.]
The second-earliest instance that I have found is from When Stars Talk: Interviewing Greater and Lesser Theatrical Lights, an article on “how arrangements are made for interviews with stars and near-stars who pass through Topeka” published in The Topeka State Journal (Topeka, Kansas) of Saturday 2nd March 1912:
“Are you decent?”
“Who is it, please?” (the “please” is seldom omitted.)
“A newspaper man.”
“In a minute I will talk to you.”
If a vaudeville “artist” in her act at the Novelty Monday afternoon seems to give out the impression that she has an interview story in her mind, […] the reporter knocks on the dressing room door (or maybe Dale Jones, stage manager at the Novelty, knocks for him), and the question, “Are you decent?” has no reference to morals, only to whether the actor or actress is presentable. And theatrical people are more particular about these little niceties than many imagine.
Other words or phrases of theatrical origin:
Box and Cox
Hamlet without the Prince
to play to the gallery
to steal someone’s thunder
bums on seats