Short answer: Yes.
The popular conception is that water and electricity don't mix. Therefore charging an electric car in the rain might get you electrocuted. Fortunately engineers at most car companies are smart people and thought this through ahead of time. Charging plugs have several layers of protection built in, and it's perfectly safe.
Also, it's safe to drive an electric car in the rain. Driving an electric car into a pool of water doesn't cause an explosion, and doesn't electrocute anyone touching the water. Just because they show something in a movie doesn't make it real.
Let's show some concrete examples before going over the theory.
For Christmas 2015 many kids got "Hoverboards". Despite the name these things don't hover, but instead are cool looking two wheeled platforms with an electric motor that you ride around. Think Segway without the steering handle. This one young lady was riding her new hoverboard around the back yard, lost control, fell off, and then the thing drove itself into the backyard pool. Seeing it in the pool she dove in to retrieve it. Someone posted the surveillance camera video on YouTube for us all to enjoy. No fire, no electrocution, just an embarrassed young lady.
This next story is very sad, as it involves an unfortunate drowning. An elderly man was driving a long-time friend in his Tesla Model S. He accidentally hit the accelerator pedal rather than the brake, the car drove through a brick wall and landed in the pool. The woman got out, but he did not, and drowned. The reason to mention it here is that the Model S was completely submerged, no fires, no electrocutions, just an unfortunate drowning.
In October 2012 Hurricane Sandy, the Super Storm, caused wide spread devastation in the New York City and New Jersey area. New York City itself flooded, including several subway stations that filled up with water. The electrically driven trains did not blow up nor cause electrocutions. A storage yard in New Jersey for processing cars being imported was flooded by the storm. A group of Fisker Karma's caught fire and exploded, as did some Toyota Prius's. All these cars were submerged in seawater, and of course salty water is more corrosive and conductive. After an inspection, it was determined the fire's source was the 12 volt battery and 12 volt system. Salt damage caused a short circuit in one of the cars, and that one car fire spread to fifteen other Karma's.
In the Spring of 2011, a massive earthquake struck the coast of Japan in the Fukushima Prefecture. The earthquake is infamous because the Tsunami flooded a nuclear power plant, causing damage that led to a meltdown of the nuclear core, and leakage of an untold amount of radioactive material into the Pacific Ocean. One of the lesser-known events is that two dozen Nissan Leaf's were mangled and flooded in the aftermath. Despite the severe damage those cars received, no fires or other problems occurred.
That's probably enough concrete proof, yes? Electric cars do not automatically explode or cause electrocutions when exposed to water. Automotive engineers know their stuff when it comes to designing cars, and electrical systems, to be used in the rain.
At this point hundreds of thousands of electric cars have been sold world-wide, and millions of hybrid cars have been sold. There's been no rash of fires or electrocutions. Instead the fires in these cars are so rare it is generally cause for a news article. By contrast fires in gasoline powered cars are so common -- nearly 300,000 per year in the U.S. alone -- that they go unreported in the press. The only mention you'll hear is on the traffic report, as a cause for traffic slowdown.
The known fires in electric cars had these causes:
The Wikipedia's writeup of the J1772 plug includes a nice section on its safety. Turns out that it was explicitly designed with several levels of "shock protection" that ensure safe operation in wet conditions. First, the pins are isolated on the interior of the connector when mated, ensuring there's no chance for physical connection between pins. Second, the pins are of differing length, carefully set up so that the control pin connection is disconnected first when removing the plug, causing the power to shut off before the plug is removed from the socket. Finally, the standard includes ground fault monitoring.
Because the charging plug has no power until it's fully plugged in, and the plug design has excellent isolation from water, both the plug and charging socket are safe in the rain.
The American J1772 plug isn't the only one in use. The European J1772 plug has its own safety design as well, as do both versions of the Combo Charging System plug.
The CHAdeMO DC Fast Charging system has its own built-in safety elements, including ground fault detection.