Remember - if you don't use correct capitalisation, punctuation and spacing, anything you write will be incorrect.
We use "by accident" in Canada.
Here's an interesting article:
Grammar Girl : On Accident Versus by Accident :: Quick and Dirty Tips ?
I am not a teacher.
I've never heard of "on accident" and I would advise learners on this site to use "by accident" (and not only because I haven't heard of the other weird phrase). If, on accident, you fall into a group that uses "on accident" that's the time to consider it.
I cringe when I hear "on accident."