I broke the plastic trim around one of the vents on an old IBM Thinkpad years ago when my poorly attached pannier bounced off of the rack and onto the pavement. The damage was only cosmetic. As Walter said, the important thing is to make sure your laptop is off before you transport it.
These days I use a padded laptop sleeve when I'm carrying a laptop on my bike, though I suspect that's overkill. A well-attached pannier should be safe enough. I use a Topeak trunk bag with zip out side pockets, which are just roomy enough hold my 15.4" laptop in its padded sleeve.
My comments above do assume that your commute is over something resembling pavement or hard-packed dirt trails. If you regularly ride over bone-shaking off-road terrain, even with a backpack, you are probably shortening the life of any components with moving parts. If it rattles your teeth, it will rattle a non-SSD hard drive. If it doesn't, it probably won't.