the answer is that it totally depends on the battery technology in use
older laptops used Nickel Cadium or Nickel Metal Hydride technologies (NiCd and NiMh respectively) which suffer significantly from something known as memory effect
memory effect is when you only partially discharge a battery and then recharge it continuously - do it enough times and then soon your battery will only retain the charge of the portion you keep discharging and "lose access" the other portion of battery life, the same applies to leaving it plugged in at 100%
without getting into too much chemistry this is due to the chemical makeup of the battery, if its not used fully crystalisation occurs over time inside. there are sometimes various things you can do to try and regenerate some battery life such as placing the battery in a deep freeze overnight then letting it come back up to room temperature before plugging back in but nothing generally will fully restore a battery suffering from memory effect
modern laptops use Lithium Ion Batterys which do not suffer from memory effect - in fact quite the opposite - the more often you fully discharge them the more you lower the usable life of the battery or lower its "health" its better to always plugin when you can
initial versions suffered badly if you left them at 100% all the time and never went to battery however this has pretty much been overcome, although its still better to use lithium ion batteries on battery mode on a regular basis to keep them active
its actually not a good idea to constantly unplug and plugin batteries unless you are changing them between spares/backups etc the more you remove and replug the battery the more you wear the electrical contacts which means a poorer physical connection which means possible other issues (including arcing and fires in extreme cases) which become more expensive to repair
to answer the should you use laptop while charging - it makes no difference to the health of the battery, you may notice however that when you are working the laptop hard (eg gaming) that the battery will charge slower as the laptop is diverting more power from ac to cpu and GFX rather than the charge circuit