My father often used to read mystery novels when he had free time.

Literal

Father [topic-は] free when [in-に] [contrast-は] often mystery-novels [object-を] was-reading [polite-ました].

~ていました (past habitual, polite) describes a past habit. 推理小説 is 'mystery novel' — a compound of 推理 (reasoning/deduction) + 小説 (novel). The には after とき adds a nuance of 'specifically when free' as opposed to other times.