Cuba is a tropical country, with little difference in temperature between months, although June, July and August are especially hot.
Personally I prefer winter where temperatures are mild (approx 25ºC), a wonderful spring which we can enjoy from October to May, I'm not bothered about rain because I like to go out and photograph clouds and wet ground.
January, February and March are ideal months, mainly due to the temperature but also for visiting the countryside, the tobacco areas in Viñales and Pinar del Rio, there's a great activity of farmers, horses, pigs, etc.
Tobacco plants fill the Northwestern valleys with greenery and activity, this, together with the clear daylight of the Cuban winter make these months ideal dates to go to Cuba.
My essay about these "green areas" can be seen in photos of country side in Cuba
The advantages of July and August are that everyone is out on the street, almost everyone is on holiday and this is a great photo opportunity. You can do a photo essay on Cubans on their holidays, the beaches, etc.
Carnivals in Havana are the first and second weekend of August, and in Santiago de Cuba they're are on the 23-24-25 and 26 July. It's a colourful world, they're simple carnavals but almost everyone takes to the streets to celebrate.
Some points against going to Cuba to take photos in July and August, are that it's difficult to go to the boxing gyms, dance rehearsals, schools, cultural projects, etc..as they're usually closed.
Web: Cuba photo tours
Video about my photo tours