If done improperly, will cause a disaster in rankings. In best case, you'll lose because the new domain performs worse than an old domain.
If IP address will also change, ensure that old IP serves the same content for at least 1-2 months after changing DNS config.
All URLs in old domain must be 301 redirected to corresponding URLs in new domain, by best possible match. These redirects must remain as long as possible, preferably forever (some external links will never be updated).
You have to keep backlinks to all old pages for at least several weeks. Probably you didn't have external links to all existing pages, so you must get them now.
You have to build links to new site gradually, and after seeing old pages fading from the index, move old links to new pages (after at least a few weeks after last seeing certain page in Google index, the links to this page may be moved to the new address).
This is my idea of minimizing disaster strategy, it's difficult to implement, but sometimes I managed to preserve traffic this way. If new domain is much worse than previous one (from Google point of view), the traffic loss is unavoidable.
[edited by: Wizard at 1:06 pm (utc) on Mar. 20, 2008]