As the second largest continent, there is a wide range of climates to be found. However, since the continent is nearly centred on the equator, much of the continent is quite warm/temperate with very few, small areas on the continent experiencing any temperatures that can be considered “cold”. In the temperate regions (parts of northern Morocco & the Mediterranean coast as well as South Africa), temperatures generally range from the 10s C to the mid-30s°C (40s-90s°F) year round. Closer to the equator and on islands like Cape Verde or Mauritius, temperatures may only vary less than 20 degrees Celsius (15-35°C/65-95°F) throughout the year. In the deserts and arid regions like the Sahel and Horn of Africa, temperatures routinely hit 40°C+ (and even 50°C+ in the heart of the Sahara) but because sand does not retain heat like most soil does, those same places can easily fall down to 15°C at night. There are a few bastions of cooler weather, however. Higher elevations, such as the Atlas Mountains in Morocco & Algeria or in Lesotho, are quite cold and snowy during winter and Mount Kilimanjaro, almost on the equator, is cold year-round (cold enough to support glaciers!). Peaks on islands such as Reunion, the Canary Islands, Mount Cameroon and more are cool enough to necessitate a jacket much of the year.
A far more important factor to consider when travelling to Africa is when the rain/monsoon season occurs. Timing varies a bit even in neighbouring countries, so check the page of the country you are visiting for more info. In West Africa the season starts in March around Cameroon, but not until June in Senegal or the Sahel and ends around September. While rain may not be a huge factor when travelling to southern or East Africa, it is very problematic in West Africa and on islands in the Indian Ocean. In West Africa, rains will often flood and make many roads and railways impassable and, due to poor drainage, can literally result in rivers of water flowing down streets and sewage lines to overflow. In the Sahel, it can result in flash floods in low-lying areas.
The largest weather-related dangers for travellers to Africa are lightning and tropical cyclones. The Democratic Republic of the Congo has more lighting strikes each year than any other country on earth, especially in the eastern part of the country near Goma. Lightning risk is highest from western Kenya/Tanzania and Ethiopia west to Senegal and south to Angola and Zambia. Tropical cyclones affect the islands of the Indian Ocean, with the season running from 15 Nov-30 Apr (15 May in the Seychelles and Mauritius). Tropical cyclones also infrequently affect the horn of Africa near Djibouti & Somalia, but when they do, the arid land results in major flooding. Tropical cyclones often form off the coast of western West Africa (Guinea/Senegal) during the early part of the Atlantic Hurricane Season (June-August) and will rarely impact Cape Verde, for which these particular storms are called “Cape Verde-type hurricanes”.