Window Stains May be From Leaks, Condensation, Lack of Maintenance or Improper Installation
A window with stains in the sill area is often an indication of moisture intrusion. This may result from needing to be caulked on the outside, the flashing being improper or installed improperly; or from the window being left open in a rain, or condensation dripping off the window or from having a small potted plant on the sill and someone spilling water while watering the plant.
Maintenance
At times maintenance, such as caulking the exterior area around the window area will help prevent moisture from entering. Many windows have a bottom track with small weep holes that allow rain water to seep out, and these holes get blocked with dust and gunk over time. Check to see if there are any blocked weep/ drainage holes. Even stucco or paint may block the holes.
Having a window installer take a look at the window, may shed some light on the cause of the staining.
Home owners can do caulking and some of the maintenance items themselves. Window installers or window contractors, as well as qualified handymen are usually very adapt at handling this this type of work.