First, your dentist can perform an oral exam and consider your complete medical history, which can be helpful in determining if bleaching is an appropriate course of treatment based on the type and extent of stains, and the number and location of restorations. Your dentist can then better match the type of stain with the best treatment, if appropriate, to lighten those stains.
When your dentist does it, he'll likely want to see you a couple of times to clear up any questions about the directions, to make sure the customized tray fits properly, to check your gums for signs of irritation, and to generally see how the process is working. With over-the-counter bleaching products, you're on your own.