Best time to visit hampi is the winter season (october to February). However, Hampi is mostly moderate and dry throughout the year. The weather remains moderately cool except for peak afternoons but mostly perfect for exploring the World Heritage Site.
I think Hampi in monsoon is not a good option as it rains very heavily in monsoons and that will affect the sightseeing, also u won't be able to njoy the coracle ride.
Best time to travel hampi is in winter i traveled in the month of October from Bangalore, Afternoon it was hot and humid, July I guess the temp will be high as it doesn't rain that much
Bes time is from October to February. But still this time around is fine as it will be mix of cloudy, rain and sunny days.
Hampi doesn't receive much rainfall so it will be fine.