Being literally-ignorant of morality would be a justifiable defense. according to the story, they had no knowledge of good and evil, and therefore could not knowingly sin. They'd be declared mentally incompetent to stand trial and, given that it was just a fucking apple (or probably not, actually...); the prosecutor chided for wasting the courts time.
but then, it's a bronze age myth and they really didn't give a fuck about niceties like 'presumed innocent until proven guilty in a court of law', or due process in general.