The best way of optimizing a site that uses frames is to stop using frames. Most crawlers only follow HREF links, not SRC links, which means that the crawler won’t find anything past the page with the frameset.
Typically development techniques like tables, server side includes, master pages, etc. will allow developers and designers to build content as if it were using a frameset, and be pre-compiled into one page before it is served to the user or crawler.
Other development techniques, like a CSS based table-less layout, increase the content to code ratio and can also mirror the layout of frames
If Frames absolutely must be used, be sure to set up the NoFrames section. The best thing to put in the NoFrames section is a full version of the page, with keyword rich headings and a full HTML based navigation menu. This will ensure the crawlers see the whole page, maintain keyword SEO, and can index the rest of your site. This will feel as if you are maintaining 2 pages in 1, and defeats the purpose of using frames, but will keep your site optimized for crawling. Also be sure to include the same content in your NoFrames tag – you do not want to lose ranking for keyword stuffing.
A common problem that occurs when you use frames is that the search engines will often display one of the internal pages in your site in response to a query. You may want to include some code to verify that the page is show in the frameset it belongs to, otherwise reload the page with its frameset.