Can the neighbor build on his garden?

A sunny garden in the city is enjoyable. Others prefer more living space: they want to build up their garden. That's bad,news for the neighbor who prefers sunlight and daylight. Is such an extension unlawful and can you stop the construction through the courts? How will the courts decide, what is the role of the zoning plan, and does the architectural value of the building complex count?