I would use a combination of the things mentioned above. A lens hood will get you most of the way there. But combine it with a rain coat for the camera and lens (these usually attach at the end of the lens hood), and an umbrella to keep yourself and some of the water off the camera.
All that being said, 98kellrs is right: you really should avoid being outdoors in a thunderstorm. Being outdoors walking when you have to be is one thing, but being outdoors just trying to capture lightning when you are in the midst of the storm is another. Just remember, that lightning can strike up to 10 miles away from a storm.
To avoid being out in the storm, you should find cover while photographing and try to photograph from outside the storm. Rain can blur the view of lightning, so it's best to capture photos before the rain starts. I'm usually out ahead of a storm, and will take photographs until it starts to rain. To take photos over a longer period of time, you can be mobile and keep driving to a new position ahead of the storm you are following. Keep in mind that storms can be moving very quickly though (45 mph or faster), so this might not be possible depending on the storm you are tracking.
Places of cover that work well for photography are wall-less shelters at parks (think gazebos or food areas) and buildings with large overhangs like you would find at schools. In a pinch, you can even take shelter in your car. This works well if you have an SUV or something where the back tailgate will go up to shelter from rain getting inside. Make sure you aren't touching any of the metal car frame.