A teacher of german will explain this better but until then I'll try and learn something about my mothertongue while I find the explanations ;)
"als" and "wenn", as translated to when, are conjunctions that introduce subordinate clauses. "als" is temporal (regarding the time) and for the past, "wenn" is used temporal for the future and whenever it is not temporal. "Wenn" may also be translated as "if". In german, the other conjuction-types besides temporal where "wenn" may occur are konditional, komparativ, konzessiv, go look them up yourself :)
"wann" is used to introduce questions about the time only. They may be direct questions "Wann gehst Du?", or other forms that unfortunately look like subordinate clauses with a conjunction too.
That was quite a mouthful. Some examples to clear them up:
"als" for the past
"Es sind alle aus den Häusern gerannt, als das Erdbeben kam."
"wenn" for the future temporal (or conditional)
"Alle werden aus den Häusern rennen, wenn das Erdbeben kommt."
"Alle rennen aus den Häusern, wenn es ein Erdbeben gibt."
"wann" is for questions or requests about the time
"Wann gehst Du?"
"Sage mir, wann Du gehst!"*
* The form "Sage mir, wenn Du gehst!" is also correct. It means "If you leave, tell me!", the other form would be "Tell me when you leave!"
EDIT made the structure of the example sentences clearer