Usually an illegal search is brought up as a defense by the person who was searched and is now being charged with evidence obtained in the search. The issue in these cases is whether the fruits of the illegal search should be used against the person who was searched. (See http://en.wikipedia.org/wiki/Exclusionary_rule)
An illegal search is in all cases a violation of a right and therefore the person who was searched has a legal remedy. This is the basis of the suit by the students against the school (see the pdf at the bottom of the article.)