There is no “best” time to visit Africa. A continent bigger than North America and Europe combined stretching across two hemispheres has a variety of different seasons and climates.
Some parts of Africa have winter rainfall, some summer rainfall other parts have year round rainfall. Winter in Souther Africa can be cool in the early morning and evening. However, vegetation is sparse ensuring animals are more easily seen.
East Africa being close to the equator does not experience the seasonal changes typically associated with summer and winter instead they have two wet seasons. The main wet season lasts from April to early June, and there is a more sporadic wet season from October to December.