You address the behavior. Trespassing and voyeruism are against the law. Those need to be enforced, which requires you to file a police report. Doesn't matter the intention of the perpetrator whether there are "legitamate" reasons he's in your backyard. He trespassed on your property, looked in windows. That needs to be addressed. This isn't a "if you do it next time then I will call the cops". He did it already. Call the cops.
After you involve the police, I would suggest preparing yourself for a "next time". Do a criminal background search, send signals that permission is required to enter your property or else you will immediatley call police, talk to your family about potential "bad guys" and how you will respond to anyone who is a real or perceived threat, read up on the law to understand your legal rights when responding to situations like this. Be smart and prepared, but not chicken little. Project calmness and confidence to those around you and not fear so your family feels safe. As a father / husband, you got this and this is one of your divine reponsibilities: to protect.
In my ward, there was an instance when authorities had to intervene between two you men in our ward. The parents were obviously involved and each side was acting with the best intentions to help those involved. But a crime was committed and reporting that crime was necessary to ensure those invovled understood the gravity of the situation and to help perpetrator change and make amends.