When looking for a cheap place to stay in Geneva I found quite a few places close to the French-Swiss border especially in Gaillard which are a few steps from the Geneva tram. Is there a similar trick for Bern? Places with very good connection into Bern but cheaper? I am trying to word this in a way so it's not too broad. (Obviously not France but perhaps cheaper places than Bern itself.)
The answer is no. There is no such trick for Bern because Bern is not right next to the French border like Geneva is. There is a reason for economic differential you described in the Geneva case: it is the unnatural political boundary which separates expensive Geneva from the relatively inexpensive French countryside. The French government has to keep the prices down to some extent so their own citizens who have lived their for scores of years can afford to remain. Even the French side is getting more expensive now though. Still, it is certainly an opportunity for arbitrage. My dad is a physicist who works at CERN and he and his students certainly arbitrage this almost every trip.
If you really want to get cheaper deals, then I'd recommend using hostelworld.com or airbnb.com or couchsurfing.com. You'll find yourself making more friends if you choose the former and living much cheaper. Plus, you will get to live right in the city center and be connected to the Bern tramway. However, you will have to share a room.
The above answer is based on my experience as the digital nomad founder of learningdollars.com.