The weather in Alberobello is fairly typical of Puglia as a whole, with long glorious sunny summers, very pleasant and warm springs and autumns, mild winters. Having said that, it can get very cold with a lot of rain in the winter months, so take note when planning your visit on the type of clothes and footwear to bring.
For spring through to autumn usually a loose teeshirt and shorts is more than sufficient, plodding up and down the hills will usually keep you warm enough. When it rains it really does pour down and personally I would avoid a visit if down pours are forecast, the hills turn into rivers and the cobble stones get very slippery.
Below is a live temperature gizmo, sunrise and sunset times with the option for a 5 day forecast.