I think storage on the hard is safer, but no place is absolutely safe.
This year I experienced my first near hurricane, with high winds and big storm surge, and it was an eye opener. If you leave your boat in its slip and remove all your sails and double up all your
lines, and spend the night at the marina adjusting your
lines for the storm surge, but the boat in the next slip to windward is tied up with undersized, old, deteriorated
line, then your boat is in jeopardy of that boat breaking its
lines and drifting down on yours. If you store yours on the hard, and the owner of the boat next to yours didn't remove the roller
furling jib, and it unfurls during the storm, the force of the wind can pull the boat off its stands and into your boat.
The lesson I learned is that it isn't enough to be satisfied with your own storm preparations for your own boat. Look at the boats all around you, and make sure they're also well prepared for the storm. If not, then I'd try to call the owner and ask him if I can remove his sails for him and put them in his cockpit locker. Unless he's a complete idiot, he'll be grateful for your offer. If he says no, then I'll tell him clearly that, if his boat breaks loose or falls off its stands and damages mine, I'll hold him responsible for my damage. If I can't contact him, I'll take it upon myself to remove his sails and stow them, or to double up his docklines.
I regard a persons boat as being sacrosanct as his home, and ordinarily never board without being invited. But when a hurricane is coming, those niceties are off. If I saw my neighbors house on fire, I'd have no qualms about entering it without permission to pull out his kids. A hurricane is just a different kind of emergency, and I have no reservations about boarding someone else's boat to adjust his
lines, or double them up, or take down his sails. After the storm is over, if he's still mad about it, I'll think about apologizing, even though he really doesn't deserve one if he put my boat at risk through his neglect.