Concerning the use of quando some different situations are to considered.
Quando describing two actions happening parallely
If you speak Spanish you can be caught in a trap. In Spanish you can never use the future after cuando. Events / actions which are going to happen in the future are insecure and therefore in Spanish, applying strictly the general rule, the subjunctive is to be used.
Spanish: Cuando lo haga, serè feliz.
not: Cuando lo harà, serè feliz.
When he does it, I will be happy.
In no romance language you can use, as in English, the preset perfect or simple past to describe an action which will happen in the future.
When he has arrived, we will have dinner. Quando sarà venuto, mangeremo.
The Italian system don't work as the Spanish system and not at all of course like the English system. The passato prossimoindicativo can never be used to describe an action / event which will happen in the future. To describe an action that will happen in the future you can use the presente but if you really want to stress that the action will happen in the future you use the futuro I. Nor in English nor in Spanish you can use the future after when, but that's possible in Italian.
Quando viene, glielo chiedo.
When he comes, I ask him.
Quando sarà qui, risolverà il problema.
When he is here, he will resolve the problem.
Quando in the case of anteriority
Quando can be used as well instead of dopo che. In this case the piucheperfetto is to be used if the action / event has happened before another action / event in the past.
Lo leggevo quando avevo finito i compiti.
Lo leggevo dopo che avevo finito i compiti.
I read it after having done the work.
Quando with an action which is going to happen in the future
That's the situation where Italian differs a lot from Spanish. You really have to read that carefully if you speak Spanish and of course it doesn't work as in English. With the passato prossimo di indicativo / present perfect you can never describe an action which is going to happen in the future. We will see later that this is possible with the passato prossimo di congiuntivo but not with the passato prossimo di indicativo.
Concerning the actions which will happen in the future we can distinguish two situations.
The action / event can be described as something finished in the future
Solo quando avrà visto il problema con i propri occhi, potrà cercare di risolverlo.
Only after he had seen the problem with his own eyes he can try to resolve it.
The action / event is described as something beginning in the future
Solo quando vedrà il problema con i propri occhi, potrà cercare di risolverlo.
Only when he sees the problem with his own eyes he can try to resolve it.
You can find constructions where quando is followed by a congiuntivo and that may induce you to believe that it works like in Spanish. That's not the case. If you see constructions like that the congiuntivo is required by the verb and not by the conjunction quando. (non sapere requieres the congiuntivo)
Non so quando abbia detto ciò, ma so che prima di entrare nel mondo Hollywoodiano ha girato anche pessimi film.
I don't know when he said that, but I know that he made very bad movies before entering in the world of Hollywood.
Non so nemmeno quando l'abbia sentita per la prima volta.
I do not even know when I heard it for the first time.
Non so dove e quando l'abbia scritto.
I don' t know when and where he wrote that.
Quando with an action / event which happened regularly in the past
If an action / event happened, happens or will happen regularly we can use quando. Nevertheless in this case conjunctions like ogni qual volta, ogni volta, which express the idea of regularity suit better.
"Pierino, qual'è l'animale che cresce più in fretta?" Pierino: "Il pesce, signora maestra. Ieri mio padre ne ha pescato uno che cresce di 10 cm ogni volta che ne parla!"
"Pierino, which animal grows fastest?" Pierino:"The fish teacher. Yesterday my father caught one and everytime he talks about it, it crows ten centimeters."
Così ogni volta che viene a casa mia, o io vado a casa sua, il nostro rapporto è fresco, nuovo e interessante.
That way our relationship everytime I visite him or he visits me is fresh, new and interesting.
E quando tutti i giorni diventano uguali è perchè non ci si accorge più delle cose belle che accadono nella vita ogni qual volta il sole attraversa il cielo.
If all the days pass the same way it is due to the fact that one doesn' t see anymore the nice things which happens everytime the sun moves on the sky.