I used to live in the Pentlands near Penicuik and either rode into town to work or took the 15A from the Bush Estate, the bus is slow, no getting around it, though the little white bus (Macewans) is good and serves several towns south of Edinburgh – I used to get that one home and get off on the A702. Taxis home after a night out were a bit of a pain and the drivers hated taking you out that far, they’d grumble about additional charges and so on. We’d end up taking turns to drive and having arguments about who did it last time etc!
Not sure I would want to live in Penicuik itself though.
There are some amazing little places in East Lothian that aren’t too much of a commute in to town.
Borders Railway is worth bearing in mind long term, though last I heard is they couldn’t find anyone willing to build it so it is a bit behind schedule now.