Graffiti is one of the different forms of vandalism. Even if it is done well, it constitutes an offence if the owner of the building has not given their permission in advance.
Without permission, it amounts to malicious damage, which is punishable under criminal and civil law. Traditional means of prevention, such as floodlights controlled by a motion sensor or watchful neighbours can help to protect your property against taggers. A green wall will also dissuade taggers. An anti-graffiti coating stops paint bonding to surfaces and makes it easier to remove (products available from specialist retailers).
Rough, uneven surfaces and coloured walls tend not to be an attractive medium for taggers. Prompt removal of these works of art will also put off taggers. For them there is no point in graffiti if it is not seen by a lot of people. There are special solvents available in the shops to remove it, or you can use a specialised cleaning company.
These tips cannot guarantee absolute protection against wall scribblings, but they can make your walls less appealing to taggers.