It's difficult to tell the complete difference as they're established by people through long social practice.
Lights are commonly referred to as luminaires and represent a complete range of lighting products, including light bulbs, light fixtures and portable luminaires. A lamp also refers to a wide range of lighting products but in reality it has more limited use and tends to describe lighting products for household and personal use, which typically illuminate an area so we can read, work, or drive. They include table lamps, floor lamps, desk lamps, Tiffany lamps, etc. Lamps are also the code words for conventional lighting technologies such as incandescent lamps, halogen lamps, metal-halide lamps, neon lamps, fluorescent lamps, among others. Lights seem to be a more modern term and is particularly popular in LED lighting, e.g., LED panel lights, LED high bay lights, LED flood lights, LED tube lights, LED spotlights, and more.
There are a few cases where lights and lamps are interchangeable, for example, street lamps and street lights are used, headlights and headlamps, night lights and night lamps.