I would like to give my thoughts on this subject. I am not an electrician, nor an electrical engineer, but I have some education in general electrical theory from college physics and computer systems classes. Take these thoughts in the spirit of a modestly educated layman with no practical experience who is as interested in reading any corrections and critiques of my ideas as I am in sharing what I know.
What I know about electricity:
¤ Electricity is the result of the movement of electrons due to the forces of attraction between electrons (negative charge) and protons (positive charge).
¤ The potential charge is based on the pressure gradient between electrons and protons.
¤ The EM forces of attraction and repulsion are carried through a field that can be effective over great distances. The path of least resistance is determined through this field before elections move. You can't fool them into a false path to ground, you can only offer them either a better path or a better ground.
¤ Protons generally make up atoms of elements and compounds around us and are joined with enough orbiting electrons to render them neutrally charged, starved for electrons causing them to be positively charged, or have an over-abundance of electrons making them negatively charge allowing them to give up their extra electrons easily. Elections, on the other hand, don't make up elements or compound by themselves and may be free of or bound with one or more protons.
¤ Protons are much more massive than electrons. This means that, in a tug of war between electrons and protons, electrons lose. Elections are, most often, moved by the attractive forces while protons, both more massive and locked in a matrix of matter with other protons, don't generally move much towards the attracting electron.
¤ Elections repel each other. This is an important concept when considering how to protect something from an electrical charge.
¤ Ground means the negative side of the pressure potential and is any condition that encourages the dispersal of the charge force. It doesn't have to be actual ground. The actual ground just happens to be the most prevalent commodity for this condition.
Now for some thoughts on what all this means for protecting equipment aboard a sailboat on the hard.
A grounded lightning rod, as James points out, brings the surface electrons, that follow under a lightning storm, up to the top of the rod. This, does not mean that all the electrons are up their. Elections repel each other, so they are difficult to pack into small spaces and their repelling force works to disperse them rather than concentrate them. They will likely fill any availible conduit evenly, like a gas fills an empty chamber. The most logical result of a grounded mast or lightning rod is to slightly reduce the distance and therefore the resistance to the potential reservoir of electron depleted protons blowing around in the clouds up above.
Another result of the repelling force of electrons is the Skin Effect. This is what makes a faraday cage work. Anything inside the cage is protected by the Skin Effect. Elections coat the outside of a conductive cage and don't affect what's inside the cage because they are busy repelling each other. The outside of the cage represents the farthest distance they can get away from each other. The only way something inside the cage can be in danger is if there is a greater potential variance between the negative charge of electrons on the outside and some object on the inside. A large positively charged object inside the cage might be able to overcome the repelling force and all the electrons would rush to the nearest point and arc across from cage to object through whatever presented as the path of least resistance.
The path of least resistance is relative. There may be more charge potential than a single path can handle. Elections can and do take multiple paths to equalize their charge variance. They do so by ratio determined by the various resistance values of their possible paths. A single path can handle only so much charge. There may come a point when a secondary path or paths is taken with significant amounts of the overflowing charge.
Specific ideas about grounding your sailboat on the hard:
Your sailboat is already ground wired when in the water. Your thoughts about grounding your keel are logical and appropriate, I think.
Options to consider:
You are storing your boat for the Winter, so you don't need the electronics to be working or connected to anything. Ground the mast and keel, but also any conductive stays that can help keep electrons on the outside of your boat. Connect them together through the ground so the electrons are free to move to the outside of the whole structure. You could even hoist a few cables aloft to facilitate this.
There is likely a large chain link fence nearby. The fence posts may not be 8' into the ground but the post diameters are large and there are a lot of them. The fencing would be a great conductor with a surface area on a par with 4 gage cables. Lightning has about a million volts of potential so go big. It's the surface area of your conductor that matters, not the cross sectional area (remember the Skin Effect).
I therefore suggest that, not only do you ground your mast and stays, but disconnect your electronics from the ground and any connection to the mast or outside conductor. Then, they are just boxes of metal and plastic like anything else inside your boat.
I look forward to whatever anyone else has to say on my musings and the chance for me to learn more.
-Will (Dragonfly)