Three people have been taken to hospital after being injured by lightning in two separate incidents during an electrical storm in Perth.

A man was injured when his house in the southern suburb of Parmelia was struck by lightning, while two other were injured while seeking shelter under a tree in Hammond Park, also in Perth's south.

Paramedics said the pair were waiting at a bus stop in Hammond Park just before 9:30am when heavy rain forced them to take shelter under a nearby tree.

They received a shock when the tree was hit by lightning.

The man injured at his home is believed to be a volunteer firefighter aged in his 30s.

His Warner Road house was struck during the thunderstorm, which started hitting large parts of the city from about 7:00am.

Emergency services called to the property found the injured man and took him to Rockingham Hospital.

City Beach was one of several beaches closed due to lightning. ( Surf Life Saving WA )

Tom Wilson, who lives across the road from the injured man, said the sound as the lightning struck was "incredible".

"We got the big crack that hit the tree, and it sort of literally threw me out of bed," he said.

"I thought I'd got sprayed with something and we all ran to the middle of the house to see if everyone was alright.

"That's when I could smell the smoke... so we scouted round to have a look what was going on."

He showed reporters where the lightning hit his front lawn, carving a line through the grass.

It also hit a palm tree, leaving debris scattered underneath on the ground, and knocked out power to the house.

Earlier today a number of Perth beaches were closed due to lightning, including City Beach, Cottesloe, Mullaloo and Sorrento.

Up to 10,000 Perth homes lost power during the storm and Western Power said crews were working to restore services.

The outages also affected traffic signals across parts of the metropolitan area during peak hour.