You'll need to be prepared for a range of temperatures, as the mountains create a variety of local and regional microclimates. That said, most of the country has a central European climate, with daytime temperatures around 18° to 28°C in summer and -2° to 7°C in winter. The coldest area is the Jura, in particular the Brevine Valley. By contrast, Ticino in the south has a hot Mediterranean climate.
Summer tends to bring a lot of sun, but also the most rain, and there were terrible floods in 1999 and 2005. Look out for the Föhn, a hot, dry wind that sweeps down into the valleys and can be oppressively uncomfortable (though some find its warming effect refreshing). It can strike at any time of the year, but especially in spring and autumn.
When to go
When you visit Switzerland you will, at least in part, be dictated by where you want to go and what you intend to do, but there are good reasons for exploring at least parts of the country at any time of year.
Summer lasts roughly from June to September and offers the most pleasant climate for outdoor pursuits (apart from exclusively winter sports). In fact, many adventure sports, such as canyoning, are only offered during this time. The peak period is July and August, when prices are high, accommodation often fully booked and the sights packed. You'll find better deals, and fewer people, in the shoulder seasons either side of summer: in April, May and October. With the exception of the busy Easter break, spring is a beautiful time of year to explore the blooming countryside. In Ticino, flowers are in bloom as early as March. Hikers wanting to walk at high altitudes, however, should be equipped for snow and ice until well into June (and, in some tricky spots, all year).
The winter season in Alpine resorts kicks off in mid-December and moves into full swing around Christmas, closing down again when the snows begin to melt around mid-April. Between the summer and winter seasons, Alpine resorts all but close down (except where year-round glacier skiing is on offer). At the very best, they go into snooze mode and can even be a little depressing.
At any time, as you travel around the country you'll hit many different climatic conditions. The continental climate in the Alps tends to show the greatest extremes between summer and winter. Mid-August to late October generally has fairly settled weather, and is a good period for hiking trips.