Map from Google - Locarno

In Locarno, located in the canton of Ticino, on the shores of Lake Maggiore, 195 metres above sea level, the climate is temperate, with cold winter, but not freezing, and warm summers, fairly sunny but also accompanied by quite frequent thunderstorms. On the other side of the river Maggia is the nearby town of Ascona. Along with Lugano, Locarno is the mildest city in Switzerland.
In the cold half of the year, the wind is generally weak or non-existent, except when the favonio (or föhn) blows, the warm, dry wind that comes down from the Alps and is able to bring clear skies and very good visibility. During the warm semester, the wind is weak or moderate and follows the breeze regime: during the warmest hours it blows from the lake to the reliefs (therefore, from the south), while after sunset and at night the breeze blows from the mountains to the lake (therefore from the north).
Here are the average temperatures.
Average temperatures - Locarno
Min (°C)125812151817141052
Max (°C)791417212427262216117

The rains in Locarno are definitely abundant, since they amount to 1,900 millimetres per year. Winter is the relatively drier season; in spring and autumn the rains are plentiful in periods of Atlantic depressions, due to high altitude southern currents which then climb the Alps, while in late spring and summer, thunderstorms in the afternoon or evening are quite frequent (and sometimes intense). During the most intense waves of bad weather, which occur in autumn (but sometimes also in spring), the lake's water may overflow, flooding the lower areas of the city.
Here is the average precipitation.
Average precipitation - Locarno
Prec. (mm)706095185220200180210235190160901895

Winter, from December to February, is cold enough, but it is milder than in the major cities of Switzerland, and even than in the Po Valley, because of the warming influence of the lake. Even fog is less frequent.
There's no shortage of rainy days, even though winter is the relatively drier season. Snow generally falls at least once every year, and sometimes may be plentiful, but tends to melt soon enough, because it occurs in conditions of southern winds. In a year, an average of 47 centimetres of snow falls. The record belongs to the winter of 1977/78, when a total of 242 centimetres of snow fell.
We can not exclude very cold periods, with night frosts and temperatures around zero degrees or even below in the daytime; however, in these cases usually the weather is dry. It's rare that the temperature drops below -5 °C, though it can happen in the coldest winters; here are some values recorded in the past: January 1985: -10 °C; February 1991: -8 °C; February 2012: -9 °C.
However, it is enough to go to the nearby plain of Magadino, east of Locarno, to find much lower temperatures, especially in winter nights, when frosts are frequent, and in the coldest winters, you can experience considerably low temperatures (for example, in February 2012 the temperature touched -16 °C, in January 1985 -12 °C, and in February 1991 -17 °C).

Summer, from June to August, is warm, and often sunny in the morning. The temperature is generally pleasant or at least bearable, also there's some wind because of the lake breezes. Sometimes an Atlantic front, able to bring some cool and rainy days, can pass; more often, thunderstorms can break out in the afternoon or in the evening. We can not exclude some particularly hot days, with highs around 33/34 °C; more rarely higher values can be reached (for example in the exceptional August 2003 the temperature reached 38 °C, and in July 2015, 36 °C).

The amount of sunshine in Locarno is acceptable in winter, when there are sunny days alternating with cloudy periods (in January there are 4 hours of sunshine per day); in the other seasons however it is not very high, because in spring and autumn Atlantic disturbances pass quite frequently, while in periods of good summer weather, cloudiness in the afternoon can form, which can lead to thunderstorms: in July, the sunniest month, there are 8.3 hours of sunshine per day on average (in about 16 hours of daylight, so the sun can be seen for a little more than half of the time).

Locarno from above

The best periods to visit Locarno are spring and early summer, particularly from mid-April to mid-June. Also September is a good month. You should however take into account some rainy days in both periods.
Summer, which is the best time for sunbathing, can be hot, though this rarely happens: usually the temperatures are acceptable, especially in June. Remember the possibility of afternoon or evening thunderstorms, in summer and in May.

See also the climate of Lake Maggiore.