the Fatwa Department Research Committee - chaired by Sheikh `Abd al-Wahhâb al-Turayrî
Guessing on a test is not unlawful. It is not a form of cheating. It is up to the student to answer to the best of his or her knowledge. A guess still falls within that category, as the test taker is not benefiting from outside knowledge when he or she makes a guess.
What is unlawful is for the student to cheat by looking at a cheat sheet or at another student’s paper. In this case, the student is benefiting from knowledge that he or she does not really possess and is therefore guilty of a deliberate deception.
It is up to the test developers to decide how to handle guesses and uncertain answers. If a test developer wants to, he or she can give a penalty for wrong answers (usually a -1/4 point on a test where a correct answer is valued at a single point) to discourage guessing. This is a lawful practice for the test developers as long as it is applied to all students equally, just as guessing is a lawful practice for the test takers, since no dishonesty is involved.
And Allah knows best.
Source: Islam Today