Hello Preetham kov,
Welcome to MySwissAlps and thank you for your question!
When it is raining there are still plenty of fun activities. The two cities I would suggest when it is raining is Bern or Lucerne.
In Bern you could explore the city. There are two main shopping streets: Kramgasse and Gerechtigkeitsgasse. These two main shopping streets are in the centre of the Old town. It is lined with six kilometers of arcades, which means you will be protected from the rain, so no umbrella is needed.
http://www.myswissalps.com/be rn/activities
Around this area, there is the Einsteinhaus Museum. This is the actual apartment he lived in when he developed his Theory of Relativity.
http://www.einstein-bern.ch/
Also nearby is the Clock tower in Bern, it also called Zytglogge, and it is landmark site in Bern.
https://www.getyourgui de.com/bern-l52/bern-zytglogge-tour-through-the-clock-tower
In Lucerne there are numerous activities you could do such as: The Museum of Transportation, take a boat
trip on the Lake of Lucerne, or take the Golden Pass train route. Please take a look at the below links.
http://www.myswissalps.com/mu seumoftransport
http://www.myswissalps.com/bo atlakelucerne
http://www.myswissalps.com/go ldenpass
I hope this gives you some inspiration on activities in case it rains. Please feel free to write again if you have more questions.
Happy Switzerland planning!
Suzanne