Some burglars are afraid of some dogs and will stay away from homes with dogs they deem a threat to them.
However not all dogs will deter burglars and even sometimes burglars will make friends with your dog especially if the dog is a smaller dog or a dog that is not very vicious.
However if the dog is a dog such as a Pit Bull dog or other dog that can look mean or is a huge dog then the burglar may be scared of the dog and not want to break into your place.
But also a burglar might carry a gun and shoot the dog and kill the dog which would make the dog useless as a deterrent for the burglar.
Or the burglar may have some bear spray or pepper spray that they could spray the dog with so that the burglar can go in and still steal from you.