US residential solar company Vivint Solar (NYSE:VSLR) turned to a second-quarter net loss attributable to common stockholders after sales and marketing expenses more than doubled.