When was the last time you saw her?

Literal

Her last [at-に] saw [nominalizer-の] [topic-は] when [copula-ですか]?

最後に見た means 'saw last.' いつですか asks 'when.' The cleft construction ~のは...いつですか focuses on the timing.