Best time to visit Bali depends mainly on the weather and on high and low season, which does affect the overall price for accommodation. High season is during the months of July and August, during Easter Holidays, and Christmas / New Year (December till 1st week of January). This is the time Bali is the busiest.
However, for many reasons, best time to come to Bali is April, May, June and September, just before and just after high season. It’s still dry season, it’s slightly less humid, and room prices and villa rentals can be 30-50% cheaper than during high season. Many shops offer sales and promotions, restaurants are less crowded in those mid-season months, and in general Bali is a bit more relaxed. October is not too bad either, still much less rain than November (usually, check the rainfall chart).
Those months are also the best time for water sport activities such as scuba diving, surfing, snorkeling, etc. Waters are clear, crowd not too bad etc. Also major activities and attractions such as the family parks and fun things to do (Bali Zoo, Bali Bird Park, Marine & Safari Park, Waterbom, White Water Rafting, Monkey Forest, etc) have less visitors which can make the experience far more enjoyable. If you wish to explore the island and visit the main sightseeing spots, temples and go for a day trip and tour, then those months are also perfect.
And not to forget, in general the traffic and hustle bustle on the roads is more bearable. Especially in Kuta, Legian and sometimes even Seminyak the narrow streets are packed during certain times in the day with cars and motorcycles. Some tourists love it that way and could not imagine a holiday otherwise, but if you like it more quiet, then Kuta and Legian during high season might not be the best choice.