The Fourth Amendment of the Constitution gives U.S. citizens the right to feel secure in their persons and prevents others from searching them without probable cause. In order to search your home, for example, the police should have a warrant. This isn't a necessity in a public school, however. Although school officials are allowed to conduct searches of a student's backpack, there are rules they must follow.
Reasonable Expectation of Privacy
Students can expect that their private items will remain private. In most cases, schools cannot search a students backpack without a student's permission. Likewise, when searching a bag, the person conducting the search must respect privacy as much as possible. For example, there is rarely any justification to read a student's diary or go through photos on his or her phone.
Individual vs. Random Search
Some schools do conduct random searches, but this generally doesn't entail digging through a student's bag at random. A student might expect, for example, to be required to walk through a metal detector at the school's entrance or for drug-sniffing dogs to walk the hallways looking for drugs. As the lockers are officially school property, school staff has the right to search through them at any time, according to Pine Tree Legal Assistance. If a student is singled out for a more thorough search, though, there must be probable cause.
There are many grey areas, but school administrators can search through a student's backpack if there is probable cause to believe that the student is carrying something that breaks the rules. For example, if a teacher hears a cell phone ringing in her bag, and students aren't allowed to have cell phones in school, the teacher could search the bag. They may also search if there has been a credible accusation that a student is carrying a weapon or drugs.
Manner of the Search
Although school staff may search a student's backpack under certain circumstances, administrators must do so courteously. For example, they should use searchers who are the same gender as the student, as a student might be embarrassed, for example, if someone of the opposite gender found tampons or condoms. If nothing is found in the bag that incriminates the student, no more searches should be conducted, unless a new incident arises with circumstances that justify a search.