Here's the sign at the top of Half Dome on this subject:
http://www.pbase.com/roberthouse/image/84870361/originalOf course, the best advice lies at the bottom, which tells you not to go up if there are thunderclouds anywhere in sight.
It's a bit counter-intuitive; I noticed an earlier post where they had taken refuge under a rock overhang, and while that seems logical, it is not safe. Unless it's right on you, I'd head down immediately, rather than try to wait it out.
If you can get hold of a copy of "Shattered Air", it's a very interesting book about some folks who decided to watch a lightning storm from a talus cave on top of Half Dome...nice and safe inside, or so they thought.
(the cave)
http://www.pbase.com/roberthouse/image/61298401The hut atop Whitney is also apparently unsafe and should not be used. The best advice is to be sure you're not up there in a thunderstorm. We just had a big lightning storm here in central-coastal CA, and I was imagining being on a summit during that. At two seconds lag (less than half a mile) the sound is ground shaking and the light is blinding; I would do everything I could to NOT be on any summit when that comes.