If you are planning a solar system in the near future you may be interested in your solar access rights. These are rights to sunlight that may, or may not, be written into your community zoning ordinances. Solar access rights state specifically that your neighbors cannot block your access to sunlight for the purpose of powering solar panels. How much sunlight you are entitled to will vary, you may not even be protected at all, but it's worth looking into, especially if your valuable sunlight is being restricted by your neighbors tree, or second story addition.
These solar rights are written into building codes for the purpose of promoting solar energy. Anyone willing to have solar panels installed on their roof should be protected from a nearby structure blocking their sunlight. Solar panels can be a very large investment and to find them useless a year after they were installed would just be wrong. Wrong also would be wanting to go solar but not having access to sunlight do to poor building practices and poor zoning ordinances.

Solar Panels
Solar access zoning can work the other way also. You may be asked to trim, or cut down, a tree if it is blocking your neighbors access to sunlight. A building addition permit may be denied if it would block a portion of the sunlight guaranteed to the house next door.
There is, at times, a quandary over the need for shade and the need for sun. Shade, whether from your tree, or your neighbors tree is valuable for reducing cooling costs. In hot climates shade is an important element in reducing energy use. Many of us want all we can get. But at the same time we want enough sunlight to power our solar panels. This means we need to give careful thought to how we use shade and how we preserve our solar access rights.
The California Civil Code refers to solar access rights as a "Solar Easement". It grants homeowners the right to adequate sunlight for the purpose of powering solar energy systems. The definition of solar energy systems is any solar collector or other solar device whose primary purpose is to provide for the collection, storage, and distribution of solar energy for space heating, space cooling, electric generation, or water heating.
Solar rights and solar landscaping go hand in hand and can provide the perfect balance for shade and sunlight, as well as the sunlight your neighbors need, and have rights to. You will want as much shade as possible in the places that really count, and at the same time, have enough sunlight available to keep your solar collectors working at peek performance.