Plant cactus, roses with thorns and other plants like that.
Pyracantha, aka firethorn, is the best defensive planting there is. It’s tough, survives neglect as long as you water it every month or two, and has truly vicious thorns. It also looks OK if you keep it trimmed (warning, you will bleed while trimming it) and has nice white flowers that develop into red berries. Plant pyracantha bushes under a ground-floor window, and nobody will climb through that window.