I recently have had problems where Safari and Mail would not remember passwords (basic HTTP authentication, POP, IMAP) even though I would check the 'keep on Keychain' box when re-entering them. I was always prompted over and over again. Numerous searches yeilded various fixes, none of which worked. I was about to give up when I stumbled upon this discussion from the MacOSXHints forum, which led to this thread on the Apple Discussions site. (Oddly, that thread never showed up in my Apple Discussion searches.)
The fix for my particular problem was to reinstall Safari and Mail because I had used Service Scrubber on them. Other people appear to have fixed the problem by restoring from Time Machine, but I had to find the individual packages on the Leopard install disc, because my oldest Time Machine versions were also affected by my too-liberal use of Service Scrubber. This blog entry explains the causes better than I can. Obviously, I cannot claim any credit for discovering the solution, but I thought a hint here might help others avoid or recover from this problem.
[robg adds: Basically, the problem is that ServiceScrubber does its thing by modifying the info.plist files within each program's bundle. In 10.5, the Apple applications are all "signed" to help prevent a hacker from successfully modifying the code...but the side effect is that programs like ServiceScrubber will also result in Safari, Mail, etc. believing they've been "hacked," and preventing access to the keychain.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20080110102506923