I have configured the Google XML Sitemaps plugin to "Build the sitemap in a background process (You don't have to wait when you save a post)" and to use Automatic detection to determine the location of my sitemap file. With that configuration, whenever the plugin tries to rebuild my sitemap in the background, it fails with "There was a problem writing your sitemap file. Make sure the file exists and is writable." It works fine when I manually rebuild it.
Because my WP site is running on an IIS server, many of the posted suggestions for resolving this problem don't apply (e.g. chmod).
I was able to resolve this problem on my system by selecting Custom location as the location of my sitemap file. I used the exact same URL as the default, but for the file path, I replaced the / with a \, i.e. I replaced D:\webs\www.mydomain.org\wp/sitemap.xml with D:\webs\www.mydomain.org\wp\sitemap.xml.
http://wordpress.org/extend/plugins/google-sitemap-generator/