事故 refers to something that happens out of carelessness or by merely coincidence such as 交通事故(こうつうじこ=traffic accident) and 飛行機事故(ひこうきじこ=plane crash). Whereas 事件 is something caused by people, mostly violent and harmful, such as 強盗事件(ごうとうじけん=robbery) and 殺人事件(=murder case).
I hope this helps.