The etiquette of leaving a faculty position If a tenure track professor wants to leave their university for another job, how much in advance should they inform their department chair? The standard two weeks notice probably doesn't apply.

And what times of the year are okay to leave? Only in the summer or between the fall and spring semesters?

The faculty member doesn't feel mistreated and doesn't want to ruin ties at their current university.
The following rules are pretty standard:


It's not reasonable to quit in the middle of a class except in a dire emergency (for example, a serious health problem).  In practice this means you can quit only between semesters, unless you aren't currently teaching.  Many universities plan their teaching one year at a time, in which case quitting in between the fall and spring semesters may be a problem.
You should try hard to leave enough time for your university to find a replacement for your future teaching.  For example, for a US-style semester system, announcing in January that you will leave as of the next academic year (starting in September) is probably reasonable.  Announcing it in April is more problematic, but it might be OK if you have to.  Announcing it in June is a serious problem, and announcing it in August is a disaster.
It's common for tenured, and sometime tenure-track, faculty to go on leave for a year or two rather than immediately resigning, even if they are sure they won't return.  If your chair offers you that option, then you should definitely take it.  Turning it down (and resigning instead) comes across as an insult: you are effectively saying that your new job is so much better that you can't imagine ever wanting to return.