-A- She won’t be back until 5 o’clock. - YES
-B- He will not return until Monday. - YES
-C- Why didn't you come until 12 o’clock? - YES
-D- I won’t be ready until Tuesday. - YES
-E- I can’t be ready until 8 p.m. - YES
-F- You mustn't be at home until 7 o’clock. - YES
-G- I don't need the apartment to myself until 8PM. - YES
These all look good. However you can replace "until" with "by" in some of these and get a meaningful, grammatically correct sentence.
-A- She won’t be back by 5 o’clock. - YES
-B- He will not return by Monday. - MAYBE
-C- Why didn't you come by 12 o’clock? - MAYBE
-D- I won’t be ready by Tuesday. - MAYBE
-E- I can’t be ready by 8 p.m. - YES
-F- You must not be at home by 7 o’clock. - NO
-G- I don't need the apartment to myself by 8PM. - MAYBE
"By" and "until" have different meanings here. If the time in question is 5PM, "by 5PM" means 1PM, 2PM, 3PM, 4PM, and 5PM. "Until 5PM" means 5PM, 6PM, 7PM, 8PM, etc. This is why you can change "until" to "by" in some of these sentences and they still make sense. Not all of them... the ones marked MAYBE seem a bit illogical if you use "by", and the one marked NO is a negative command so you cannot use "by". But the ones marked "yes" can definitely be changed. They just have a different meaning.
Now let's take a look at the positive forms of these sentences...
-A- She will be back by 5 o’clock. - YES
-B- He will return by Monday. - MAYBE
-C- Why did you come by 12 o’clock? - NO
-D- I will be ready by Tuesday. - MAYBE
-E- I can be ready by 8 p.m. - YES
-F- You must be at home by 7 o’clock. - YES
-G- I need the apartment to myself by 8PM. - YES
Some of the sentences above would sound much better with a preposition that is neither "until" nor "by". You want to turn them into statements of fact rather than using periods of time.
-A- She will be back at 5 o’clock. - YES
-B- He will return on Monday. - YES
-C- Why did you come at 12 o’clock? - YES
-D- I will be ready on Tuesday. - YES
-E- I can be ready at 8 p.m. - YES
-F- You must be home at 7 o’clock. - YES
-G- I need the apartment to myself at 8PM. - YES
Finally, let's take a look at some positive sentences used with the preposition "until".
-A- She will be back until 5 o’clock. - NO
-B- He will return until Monday. - NO
-C- Why did you come until 12 o’clock? - NO
-D- I will be ready until Tuesday. - NO
-E- I can be ready until 8 p.m. - NO
-F- You must be at home until 7 o’clock. - NO
-G- I need the apartment to myself until 8PM. - YES
Most of these constructions are not allowed, but as you can see -G- is an exception.
This is a complicated subject and I do not have the grammar rules memorized. Hopefully these examples are helpful, and somebody else who knows the grammar rules can also post an answer.