When a spider spins a web, the sun will shine

It is said that spiders can sense humidity and have a habit of spinning their webs only when the sun is going to shine. Strong wind and rain can damage webs so spiders don't waste their energy constructing them if they know they will soon break.

Verity:

You might think the above superstition is mistaken, and that spiders spin webs only when it's going to rain, not shine. You'll have no doubt seen spider webs covered in water droplets more often than you've seen dry webs. But actually there are as many webs before and after rain; we just don't notice them as much when they are dry.

(The spiders hope their prey doesn't notice them too!)

There is indeed a mistake in the superstition, but it's not whether it's going to rain or shine. Spiders cannot make such predictions, but do react to changes in current or recent weather. If it's windy, they'll build a web in a place sheltered from the wind, or perhaps at right-angles to the wind to reduce the potential for web damage.

In addition, the available types and volume of prey differs according to changes in the weather, and spiders modify their web-building behaviour accordingly.

Spiders build webs in response to the weather, not the other way round.

Other insects also respond to weather, such as ants.