People who buy electric cars are far more likely to buy solar panels. And storage batteries. And wiring they would need for the electric car. It's all directly related.
So when I buy a Tesla ... I have to hire a 3rd party to install the wiring to charge it. I can buy the storage battery from Tesla, but again, need to hire someone else to install it. And if I want solar panels for that storage battery, again 3rd party.
SolarCity has a fleet of professionals ready to do all of that. They also have a plant to manufacture their own panels, which hopefully they'll be able to differentiate on. Combining the two companies will enable Tesla to service that whole loop with the equipment and installation.
Now, you can argue that Tesla may have been better off starting their own division from scratch or buying someone else ... but from what I heard, they're getting a hell of a bargain for SolarCity.