Like most of Europe, the most popular times to visit are June-August. And if you are only able to visit in the summer, this is still a great time to do so as Slovenia is much less busy than other European destinations. However, in my opinion, the best time to visit Slovenia is from mid-March through May. September and October are also nice for the fall colours, but keep in mind that this is also the rainy season.