Best time to visit Uganda depends on the kind of safari you want and the activities involved for example;
Someone chasing water falls, the rain season is the best because the river will be full and the water falls more beautiful. The same for someone interested in Agritourism. However for people interested in safari and hiking the dry seasons are better.
Uganda does not have four seasons of Europe or north America ie winter spring, summer and autumn
Uganda weather is generally divided into wet and dry season, the wet season is when there is a higher liked hood of rain and this is when the most farmers plant.
Different regions in the country have different number of wet seasons, with some having 3 in a year.
Some having 2 seasons and others one prolonged season.
Then there is a dry season when the temperatures are high but again not so bad as summer temperatures.
Most people like to visit Uganda during the months of December to February and June to august because are traditional dry seasons that have minimal rains but with climate change the rains have changed. do not be surprised to find it raining every after few days in the middle of July and august which never rained in the past of finding long stretch of no rain in march, April, May and September to November which are traditional wet months. please note that ever in the raining month the sun comes out and the ground dries in no time after heavy raining.
During wet season most of the country has a beautiful green cover which is a result of the rains.
The off roads are generally difficult to drive through but thankfully a lot of roads to the parks have been paved but expect some zigzagging in some area.
There is more vegetation in the parks and ease to see animals because there is enough food for gorilla and chimpanzee, trekking will not require you to travel too far but the trekking in the forest might have sessions of sliding and falling.
Some of the hotels and lodges have subsidized rates to attract more visitors to travel during this green season.
In the dry season roads are often good and there will be no chance of getting stuck.
The vegetation is low and can easily sight the animals but they also have high tendencies of hiding as they move in search for food and water in areas that might have access.
In gorilla and chimpanzee trekking, these primates will tend to move further in the forest looking for food in the area that a bit well with food. They will often move to a higher terrain that has more food as it is less affected by the sun.
Also most people tend to travel during dry season, so there is generally more cars on game drive. Generally most lodges are charging the high rates because most people prefer to take vacations during this time.
When all is said, I would say regardless of time you choose to travel to Uganda, be sure that you will have a fantastic time engaging with Ugandans and enjoying the sights of beautiful landscape and amazing activities like gorilla and chimpanzee trekking bird watching and safaris etc.