This is already a thing; see Coober Pedy [1] in Australia, there's houses carved out of mountains, etc. This is also likely how people will be living on Mars. And houses can be built to emulate living underground, with e.g. shutters on the outside (another thing that has been around for centuries).
[1] https://en.wikipedia.org/wiki/Coober_Pedy