Fillings (white or silver restorations) are recommended when a cavity has been detected.  Pain is not necessarily an indicator of needing treatment.  In fact, if pain develops from a tooth, this indicates the bacteria that caused the cavity have now infected the inside of the tooth.  Root canal therapy may be necessary or in some cases, the tooth is hopeless (unrestorable) indicating removal of the tooth.  Preventative treatment is always the best treatment.  Treatment of an area before it progresses also ensures the longevity of that tooth and prevents major pain and infection.