You can visit Cannes all year round.
All things to see, activities (except water sports) and even boats for the Lérins islands are available at any time.
If you want to go to Cannes to enjoy the beaches, the best option is to go there between June and September.