Yes, photovoltaics can generate electricity even in cloudy weather, although the output can vary depending on the intensity of the sunlight. Modern photovoltaic cells are also able to utilize diffuse light, which means that they can also produce electricity on cloudy days, albeit to a lesser extent.