Here's a conversation:
Speaker1: I have already seen this film.
Speaker2: When have you seen it? [OR] When did you see it?
Speaker1: Last month.
Are both of the responses from Speaker2 correct?
Both versions of (b) are valid, but one difference is "When did you see it?" is far more common...
Only my opinion, but on average I feel that "when have you seen it?" is more likely to be accusatory or incredulous. There's often a sense of "I don't believe you! Prove it by telling me exactly when!".
The normal response would be When did you see it? The statement which prompts it uses the present perfect construction because the speaker is relating the fact that he has already seen the film to something happening at the time he is speaking. He may, for instance, be in the cinema watching the film for a second time, or someone may have suggested that they see it together. The subsequent question would normally have the verb in the past tense, because the second speaker is not concerned with relating the previous viewing of the film with the present, but wants to know at what particular time in the past the first speaker saw the film. Identifying an event at a time in the past is one of the main uses of the past tense.
The present perfect is rarely used with an adjunct specifying a time, perhaps because its use is in some way to relate the past event to the present, so specifying the location in the past is somewhat inconsistent.
"When" is effectively a temporal adverb, so the same applies.
In the example offered by the OP, I would always opt for the simple past question
The simple past, as Barrie England's answer explains, is used for “Identifying an event at a time in the past”. In fact the response is "Last month", that month belongs to the past, it has no connection to the "now" present. But speaker 2 could have easily replied with
Despite this month being still current, the first speaker remembers seeing the film at a definite moment in the past. This "moment" could be any time between the beginning of the month to when speaker 2 asked the question. However, if he had seen the film very recently, he would probably have replied: Yesterday; last night ; on Sunday; a few/couple of days ago etc.
It is rare that questions asking "when" are in the present perfect, but not unheard of.
Google Books provide similar examples
And with since when...
In the mentioned examples, the speaker might be referring to a state which lasts up to the present moment; an incomplete activity; or a repeated activity.