I work at a college and somebody did that to me and other bikes on the rack several times. I figured it was a passive aggressive soul (and knew of one who might fit the bill, but also might not)... and I narrowed it down to Tuesdays and THursdays, early afternoon being the times it would happen, but didn't catch the dude. I took my portable lights inside and s/he couldn't turn on the generator light (it all depended on which bike I was riding).
I considered putting something really slimy and disgusting on the "on" button, but I figured this was somebody just a tad unbalanced and trying to bust him/her was a better idea to hold him/her accountable. It didn't happen, alas...