How to give objects clickable labels in Blend4Web?
These labels are called Anchors.

Here is the section of the Blend4Web Manual that explains about them.



The object to be given an Anchor must be an Empty, so if you don't have an Empty selected the option will not be available in the menu.

Here's where to find the Anchor settings (for an Empty):



The above screen shot was taken from the Planetarium Demo you mentioned. The source files are included in the Blend4Web SDK, so you can see exactly how it was done: /blender/interactivity/solar_system/solar_system_en.blend