The best time to go to Kokoda is during the dry season, which typically runs from May to October.
During these months, the weather is more predictable, with less rainfall and lower humidity. This makes the trekking conditions significantly more manageable, as the trails are less muddy and slippery. You'll generally experience clearer skies, which is ideal for enjoying the views and for photography.
For trekkers, especially those undertaking the Kokoda Track, this period offers the most comfortable and safest experience. The lower chance of heavy rain means river crossings are less hazardous, and there's a reduced risk of landslides.