A 22-year-old man has died after being struck by lightning during the wild storms that swept through Sydney and parts of NSW yesterday.

Police say the man was attending to a small grass fire on a property about 25km north of Mudgee when he was struck by lightning about 3pm yesterday.

Rural Fire Service members immediately commenced CPR before NSW Ambulances paramedics arrived, however, the man sadly died at the scene.

Sydney copped half a month’s worth of rain in a few hours yesterday, with the State Emergency Service responding to 160 calls for help.

The Bureau of Meteorology has warned that more rain and possible thunderstorms are on the way, before temperatures hit the high 30s and into the 40s over the weekend.

Photo: Twitter / Amanda Syrowatka.