1. The exams were blank. This is the most likely interpretation, as it implies the teacher didn't grade the exams yet.
2. The grades were not written on the exams. This is possible, but less likely. It implies the teacher graded the exams, but chose not to write the grades on them for some reason.
To make the sentence clearer, you could rephrase it as:
* The teacher returned the ungraded exams to the students.
* The teacher returned the exams to the students without writing the grades on them.
These rephrased sentences remove ambiguity and make it clear that the exams were not graded.