It does but at a greatly reduced output (5-20% of rated output depending on the thickness of the cloud cover). Partly cloudy weather leads to a very bumpy output graph.
I mean, of course, but is it really the best use of the limited resources of a nation? Germany isn't playing to its natural competitive advantage by pursuing solar, vs. someplace like Morocco. Nuclear would be a much better option, but we know how that ended up.