"On accident" (meaning "accidentally") does seem to be an unusual usage that frequently appears in opposition to the much more idiomatic "on purpose" (meaning "purposefully"). These are the kinds of idioms commonly used by e.g. children in explaining why something has gone wrong:
—"You broke my toy on purpose!"
—"No, it was on accident!".
A quick survey of the 34 incidences of "on accident" in the Corpus of Contemporary American English show about half have the sense discussed here, and "on accident" does occur in opposition to "on purpose":
HAAS: That happens in so many cases where you're got misinformation that's either leaked on accident or on purpose.
— from "Gunman Kills 32, Wounds 28 at Virginia Tech" on On the Record w/ Greta Van Susteren on Fox News, 2007
JACOBUS: Big difference when it's on purpose and when it's on accident.
— from "Dean, Democrats and Iowa's Deadline", on CNN, 2003
Other examples are from fiction:
"Dad better not see this or you'll get it. I'll tell him we were play fighting, and I slugged you on accident."
— Evan Shopper, "If I have to hit one of you, I'll hit you both" in The Massachusetts Review, 2003
She was thirteen years old, called herself a "gangsta ho" even though all her friends were white, and had already dropped out of school. "On accident," she said - she'd broken her collarbone the year before horsing around on her cousin's dirt bike and missed so much school that she simply never bothered returning.
— Emily Shelton, "From MEMPHIS (Short story)." in Chicago Review, 2003
"By accident", in contrast, has 1419 results, making it more than 100 times more common, and occurring not just in spoken and informal written English, but also in formal edited writing in academic journals, magazines, and newspapers.
Whether it's common or natural (and I'm not sure it's either) it doesn't make sense. An event can occur between two others, so there can be an absence of office hours between 12:00 and 13:00. Alternatively, an event can last for a given length of time, so the absence of office hours is from 12:00 to 13:00.
That apart, the information might be more effectively expressed as The office will be closed from 12:00 to 13:00 or The office will be closed between 12:00 and 13:00.
Best Answer
There are a few things going on here, but the simple answer is it depends on if you emphasising the way that he lost his legs, or emphasising the manner in which he lost his legs.
In the first case you would say he lost his legs in an accident.
In the second you would say "he lost his legs by accident", though it generally goes without saying that someone didn't deliberately lose their legs!
in/on
I believe you can say 'He lost his legs in accident' similar to 'You have been charged for this transaction in error', but it's very formal, and puts me in mind of a letter from your bank. The emphasis of this one is the same as "he lost his legs in an accident".
The one thing you can't say as far as I'm aware is on accident, because on accident is not an adverb phrase.
Adverb Phrases
You can't say that he lost his legs on accident, but you can say that he lost them on purpose. The reason for this is that on purpose is an adverb phrase that can be used in place of an adverb.
An adverb phrase is a set of multiple words that act in place of an adverb. So you can say "he lost his legs deliberately", or "he lost his legs on purpose", and in those examples deliberately and on purpose serve the same function. Other examples of adverb phrases include on purpose, on time, or on a whim.
Adverb phrases can be tricky, because they're cultural, and you need to just know which ones are valid on a case by case basis!
I hope that helps.