The hot and sticky rainy season lasts October to March with heavy rainfall throughout. The worst time for rain is between December and February but this doesn’t necessarily mean it will rain everyday, you can get sunny days in-between and the temperature all year round is between 18°C to 29°C. Obviously the humidity is very high in the rainy season and much better in the dry season.
So depending on your weather preference, I like to go Mid February to June or Mid September to November. I often catch the rainy season, but the rain doesn’t bother me so much and can be quite refreshing compared to the dry climate of Calgary Canada.
Here is a video of the last time I went to Bali early this June.