As has been stated in other answers (and in several comments), professors are people, too. The question here really shouldn't be "should I send a professor a note of condolence?" but rather "do I know this person well enough to be comfortable expressing condolences?"
There are folk who might react badly to such a note from a student (or from an employee, or from a super market checkout-person), and there are others who might expect such an expression. You genuinely never can tell, but I think that it is better to err on the side of humanity, and send a quick note, e.g.
Dear Professor X,
I am sorry to hear that [XXX] has passed.
If you cannot replace
[XXX] with a name and/or relationship, maybe don't send the note (if you don't know the professor well enough to know who has died, and what their relationship to the professor is, you aren't in an appropriate social circle to send a note).
As an added note (and, frankly, I think that this is the only really novel observation that I have to offer), your professor has told you that a family member has died. They have already opened the door to you, and invited you into a circle of people who know what is going on in their life, and are, therefore (in my opinion) invited to offer expressions of condolences.