Outside lights that light up an outdoor area pretty good can deter burglars from the area because burglars will mostly avoid areas where they can be easily seen.
Outside lights do not deter all burglars though and can sometimes even help that burglar see better because some burglars will even burglarize homes and businesses during daylight hours.
A better idea is to have outdoor lights that automatically come on when it detects someone near the area as that deters burglars much better than just outdoor lights on all the time.
Still outdoor lights do help deter some burglars so they are helpful.
I leave my front and back porch lights on all night every night so that I can easily see if someone may be out there and it shows that someone is in the house and living there.