Indonesia is a tropical country right along the equator. This means that temperatures tend to be very similar year-round: hot in the lowlands, cooler or (only at night) even downright cold as you move higher up in the mountains. Even down along the coast, temperatures alone rarely climb too high, but they do feel a lot higher due to the high humidity levels. What may vary more is the amount of rainfall, and this is what many people try and time their visits around. Basically, in most of Indonesia the so-called "rainy season" is during the European or North American winter, with the "hot season" being the northern hemisphere's summer months. In between is a transitional time. The only part of Indonesia that doesn't follow this pattern is Maluku, and a few neighbouring areas of Sulawesi and Papua - see the Maluku and Papua climate pages for more on this. So, in brief, the best time to visit most of Indonesia is between May-September, while if Maluku is your main target, November-March are the best months.
VISITING DURING THE RAINY SEASON?
If you can't time your visit to fall during those recommended periods, don't dispair! In much of Indonesia, there is actually very little difference between the "rainy" and "hot" seasons - it just tends to be hot, humid and prone to sudden rainfalls all year round. Regions where the differences are less marked include Sumatra, Kalimantan, North Maluku and most of Papua - not for nothing are all these areas covered in dense tropical rainforest! The seasonal differences tend to be more noticeable in the comparetively more arid southeastern part of Indonesia, from East Java through Bali, Nusa Tenggara, Southwest Maluku to the area around Merauke in Papua. No matter where you go, you should also be prepared to the fact that Indonesian weather is also notorious for being totally unpredictable. Once I had days of constant rains in Flores during what was supposed to be the middle of the hot season, while returning to the same spots during the middle of the "wet", I found them basking in glorious sunshine! Locals themselves often lament on how the rainy season arrived early, late, or even not at all this year...
And even if you are there during the actual rainy season, the rains tend to fall in heavy, sudden downpours lasting usually only for a few hours in the afternoon, with plenty of time left when the sun is out and you can do what you wish. It is very rare indeed for any area to experience non-stop heavy rainfall for days and days on end, and since the country is so huge, you can always decide to hop on a flight and move somewhere sunnier if you are unlucky enough to be caught up in prolonged bad weather.
The main purpose of your trip may also be an important factor in deciding whether rainy season visits are worthwhile. Diving and snorkelling are worst affected, probably followed by trekking. On the other hand, if you have general sightseeing and relaxing as your priorities, you can probably have a good time - just always carry an umbrella with you, and maybe a good stock of books for the rainy hours!
There are a couple of websites that can offer more detailed information on climate and weather conditions for those who are really concerned. When checking these out it is important to remember that any rain or thunderstorm possibly predicted for the coming days, or described in historical weather records, may well last or have lasted only for a few hours or even less, and those hours could even be at night! In much of Indonesia, days when there is no rain at all are something of a rarity, and the mere fact that some rain was recorded or is predicted means very little indeed. Keeping this in mind, you can check out the following:
This site provides very clear overview of climate patterns for 10 Indonesian cities from Medan in Sumatra to Biak in Papua. In addition to a daily forecast, average daily maximum and minimum temperatures, number of rainy days and mean total rainfall are given for each month in a way that makes them very easy to compare.
This site provides more data on more cities throughout Indonesia - with a sprinkling of Papua New Guinean towns mixed between them just for confusion!
It is less clearly presented, with the main data to look for being those on precipitation and average number of rainy days.
This site offers the most detail and on the widest selection of Indonesian locations.
It tells you everything about the current weather in each location from humidity and visibility to the actual temperature, and offers both 5 day and extended forecasts.
Its most interesting feature however is that you can even look up historical weather data from the past years, thus allowing you to see what the weather was like during the time of the year you are planning to go in the past. You can get historical weather data on a daily, weekly or monthly basis, though don't be overly surprised if data is not available for every place and every time - the local station may not have bothered reporting!