A teacher should not be allowed to search a student's personal computer that is based at home. If, however, the student has a computer at school then I believe a teacher has every right to search it. When a student is on school property that makes everything they bring with them subject to searches, including their computer. I honestly don't think the teacher would find anything, most students are too smart to leave something readily available but I do feel the teacher does have the right to search it if they see a need.
If we are referring to personal property, the no, teachers should not be allowed to search them. Problems or concerns with a students personal property should be brought up with the parents or simply brought to the parents attention. What a student has on their on personal property, is not something a teacher should be privy to and it would also be a breach of the students privacy.