Here are a few guided tours that include tastings of chocolate (and sometimes cheese) while you explore Lucerne city.
Lucerne Chocolate Tasting & Walking Tour
Lucerne Walking Tour + Chocolate & Cheese Tasting
Private Chocolate & Cheese Tour of Lucerne
If you prefer to do this self-guided, the two best chocolate shops in Lucerne are:
Max Chocolatier - Hertensteinstrasse 7, 6004 Luzern
Confiserie Bachmann - Schwanenpl. 7, 6004 Luzern
Confiserie Sprüngli - Hertensteinstrasse 62, 6004 Luzern
You may also try:
Au Cachet - Pfistergasse 15, 6003 Luzern
Confiserie Kurmann - Bahnhofstrasse 7, 6003 Luzern
Or visit the nearby Aeschbach chocolate factory, 10 mins by train from Lucerne.