A former town centre bank will be turned into homes after planning permission was granted.