Take the lights and anything else thats likely to be stolen off your bike.
For things that can't be removed easily, you may want to use something like Pitlock security skewers (or security bolts) or glue in ball bearings or similar into the head of the bolts (which will make them hard to remove when you need to remove them, but a casual thief can't remove them easily).
Also, make sure you know how to properly lock up your bike (which has been discussed at length in other places on this SE).
bicycles.stackexchange.com/users/8219/Batman
In terms of accessories like lights, GPS, etc.
the only way to be safe is to remove them entirely.
Remember that if something is quick-releasable for you, it's also quick-releasable for thieves.
Bike lights will frequently get stolen even if they aren't easily removable, because they're valuable.
There is an assortment of "anti-theft" bike accessories available, but most of them just rely on obscure screws, and they tend to be inferior products as they must make other compromises in order to be harder to steal while also being priced competitively.
For bike components you may also want to remove as many quick release levers as possible.
I've had a seat + seatpost stolen before, and know many people whose wheels have been stolen.
You can lock your bike in such a way to prevent wheel theft, but it's impractical to lock things like seats, so you have to make it as difficult as possible.
bicycles.stackexchange.com/users/262/nhinkle
Fortified Bike sells bike lights that are designed to be theft resistant.
They're made of heavy aluminum and use security screws so most thieves won't have the proper tool to unscrew it.
The also sell a security seatpost clamp to help keep thieves from stealing the light by stealing your seat.
I haven't used their newer rechargeable lights, but I've had their older Defender Stealth model on my bike for about 3 years now and haven't had it stolen despite keeping my bike locked up outside at work.
bicycles.stackexchange.com/users/5459/Johnny
I've attached lights etc.
with anti-tamper torx screws and normal screws in awkward places (like under the rear rack).
Both have some deterrent value over normal screws in easy-to-reach places, which in turn are better than clips that need no tools at all.
Some modifications may be required to replace the thumbscrew with something more secure.
But I had half a front light stolen because the rest was well screwed on
- they opened it as you would for changing the batteries.
Most lights are designed to be easy to take off, which might as well mean hard to secure.
For anything other than cheap rubbish lights you should reckon that they'll be stolen or destroyed in the attempt whatever you do.
You should probably make the same assumption even for cheap rubbish if you reply on them, or at least have a backup (in my case a cheap rear light on my pannier - which comes with me - and a headtorch on my helmet).
bicycles.stackexchange.com/users/7309/Chris H
The only way to do this would be lights that are integrated into your frame so they can't be removed.
Not a cheap option.
Instead, leave your lights and tools, etc in a bag that can be removed from the bike with one motion, or in a backpack, so you have them but only fit the lights to the bike when you need them.
I don't generally leave the helmet at the bike either...
I've had one stomped to pieces while I was elsewhere
bicycles.stackexchange.com/users/19705/Criggie
[With lights that attach via a quick release system,] clip the quick release thumb lever off with wire cutters, you can still remove them with a flat screwdriver.
It's only good for stopping the opportunistic thief.
bicycles.stackexchange.com/users/32960/Mike Babich
I wrote a post listing out some locking lights and other alternatives to detachable lights on my website: Bike to Everything - Locking Lights .
Here is some of the info rewritten specifically to answer this question.
You have a few options to prevent theft of your bike lights: Locking lights that use tamper proof screws on them (example:
Fortified lights mentioned in another answer.)
Anti-theft lights that are extremely inconvenient to remove and use non-standard hex sizes (example: Bell Radian 650 anti-theft lights) Concealed Lights.
If you attach your light on a seat stay or underneath your rear rack for example, it may be less obvious to a thief that there's a light there.
Get your own tamper proof screws and attach your (non-detachable)
lights that way.
(As Chris H mentioned) Bike saddles can sometimes come with integrated lights (easier to find for a cruiser style seat), and bike saddles can be locked down .
Helmet lights can come with you if you take your helmet in with you.
There are now helmets with integrated lights (example: Lumos), you can get a light that attaches to the helmet, or you could even get a normal headlight that you put on your helmet.
You can attach lights to your bag or pannier that you take with you, so you don't have to think about removing the lights.
I love using both my Fortified lights and the Bell Radian 650 lights, and
honestly I hope more companies start coming out with some better anti-theft lights so you can lock your bike with only a U-lock !
bicycles.stackexchange.com/users/20140/biketoeverything.com
I was wondering what one could do to keep his bike attachments from being stolen. On Monday two lights were stolen off of my bike. I only had them for a day. It was the kind that has a rubber "strap" of sorts that goes on the handlebar. I only really care/want to know because they were fairly expensive...
Protecting bike attachments such as lights against theft
bicycles.stackexchange.com
<headlights><theft><battery>
bicycles.stackexchange.com/questions/35624
bicycles.stackexchange.com/users/23500/BuildNC
All items that can be easily removed should be taken off the bike when it is left. Moreover, your bike should be properly locked up. Anti-theft lights are available as are locks for seats. For items that are difficult to remove, there are various anti-theft devices on the market, such as security skewers, however, some doubt is cast on their efficiency. Lights and anything easy to be removed should be taken with you or secured to the bike. Quick release seat clamps can be replaced with security clamps, and lights can be attached to the helmet or panniers and taken with you. Theft-resistant bike lights and other systems may not be very effective or high quality, but are available. Lights integrated into the frame are expensive, but helmets and saddles have cheaper integrated lights. As a quick way to slow thieves down, cut off any quick release levers so they can only be removed with tools.
Lights and anything easy to be removed should be taken with you or secured to the bike. Quick release seat clamps can be replaced with security clamps, and lights can be attached to the helmet or panniers and taken with you. Theft-resistant bike lights and other systems may not be very effective or high quality, but are available. Lights integrated into the frame are expensive, but helmets and saddles have cheaper integrated lights. As a quick way to slow thieves down, cut off any quick release levers so they can only be removed with tools.