Solar panels do generate electricity on cloudy days– they just do not perform as well as they would on a bright sunny day. Though estimates range, solar panels will generate about 20-40% of their normal power output on a cloudy day.
Real life example:
Here is the Actual electricity generated data from 3kw rooftop solar system which we had installed.