If you commute or travel by train but need to drive to the station, chances are you can park for free or reserve a parking spot through the Park+Rail programme of Swiss rail company CFF. Check their website, in English, and enter your station to see what your options are. Unfortunately, not all stations are treated equally: some offer a few free spots (Mies for instance), others have spots for sale on a daily, monthly or yearly base (Nyon, Morges and Geneva, with waiting lists) or a parking lot run by a private company, with hourly rates (Geneva, Lausanne). Parking spaces also available for bicycles, indoor or outdoor.
If you live on the French side of the border and commute by bus or tram, call your local city hall, as each town has its own policy.