SolarCity was founded by Peter and Lyndon Rive, who are cousins with Elon. Elon quickly took the role of chairman, and helped start the company. By 2009, it's solar panels were generating 440 megawatts of power (For scale, a typical coal plant produces 600 megawatts).
They are the leading solar residential installer in the United States. SolarCity had purchased Paramount Equity for $120 million in 2013. The company had announced that they would be going public, and SpaceX had quickly snatched up $90 million of the $200 million stock. The company was acquired by Tesla in 2016 for $2.6 billion in order to "[Create] a seamlessly integrated Tesla battery & solar power product that looks beautiful".
The company's primary focus is to now advance the technology for batteries in Tesla cars, pumps, solar panels, and more.