In simple terms, the right to lightis a legal requirement for a homeowner to be able to access daylight that passes over someone else's land - usually a neighbour - and through their windows (as the most common opening found in residential buildings).
However, having the right to light is not the same as having access to direct sunlight - for one thing, those personal benefits described above are almost all well-served by simply having access to daylight, regardless of whether the sun is shining, and certainly doesn't need to shine through a window. It would also be impossible to construct properties such that every window has total access to sunlight - even when it is shining.
The other point to note is that the legal position is clear on gardens: there is nothing in place to compel a neighbour to remove an obstruction (say, a fence or a tree that has grown significantly) that is blocking sunlight in part or all of your garden. This is covered by the above statement that it's the right to daylight and not direct sunlight that is covered by the legislation.
So, even with these perhaps annoying obstructions, your garden will still have daylight coming into it, and you'll have to find another way to compromise with the neighbour.
There is a good discussion on rights to light written for an article published in the Law Society Gazette.