How does the sun impact changes in the weather?
I don't know if these needs a lot more explanation or not. All of the energy that is required to form and change the weather, indirectly, comes from the sun. The sun heats the surface of the Earth and that in turns heats the atmosphere which is where the weather occurs, but the energy came from the sun to start with.
The sun plays a role in the process of how thunderstorms develop
When a city gets enough sunlight, considering it is warm and humid, this allows warm air to rise and form clouds, and destabilizes the atmosphere. This is called daytime heating. Sometimes, the air rising cannot rise anymore, and this is called an atmospheric cap. The air may become even more heated to the point where it breaks the cap, and at that point in time, when it breaks the cap, thunderstorms flare up. These storms can be particularly intense.