which tense do we use with "when"?and why?
Your question is too broad - different tenses can be used after when.
I guess you mean the problem many esl learners have - when the future is concerned. If so, we use the Present Simple or Pr. Perfect.
We shall mend the roof when fine weather sets in.
I'll return you the book when I have read it.
Why these tenses? Because that's the rule, I don't think you need to go deep into grammatical theories.