It's tartar. A professional dental cleaning will leave the teeth shiny and white. Tartar on teeth can lead to various problems (tonsillitis, heart murmurs, etc.) - healthy teeth make for a healthy dog.
The yellow is the first stage before the brown.
If you want to avoid anesthesia or the vet bill, you may want to try this product "Life for Teeth" sold by
www.tobysnaturalpets.com. I use the spray version and have been happy with the results.
I have had no luck using a professional dental teeth scaler on my own.