"Are you spending the class on writing letters?"
Translation:Bruger du timen på at skrive breve?
If this is meant to be a question of a teacher, perhaps: "Are you spending the class on letter-writing?" or "Are you spending the hour/period teaching letter-writing?" in English.
"Timen" can be both 'the hour' and 'the class session' but since the english sentence says 'class' it sounds like a teacher or fellow pupil.
"Bruger du timen på at skrive breve"- when you should be spending it on the assignment.