Google has created an open source tool called “Google Email Uploader”, that works in Windows XP and Windows Vista to make the transition to Google Apps easier. The application imports messages and contacts stored locally in Microsoft Outlook 2002+, Outlook Express and Thunderbird to a Google Apps account. It doesn't modify the sent dates from your messages and it converts the folders into Gmail labels.
The uploader works only in the premier edition of Google Apps, even though Google says it should work in the standard edition, as well. If you try to use it with a standard Google Apps account, you'll get this error message: "you are not authorized to use this feature". The most likely reason why the application works only in the paid version of Google Apps is that it uses the email migration API, which "allows administrators and users of Google Apps to migrate mail from legacy email systems into their domain's hosted Gmail accounts". The API is enabled for the paid accounts and it's also used by gMOVE, a tool that migrates Outlook calendars, email, contacts and tasks to Google Apps for $19.
You can also import old mail to a Gmail account using IMAP: simply drag your old messages to Gmail's inbox in an email client, but the new application should be more reliable.
Google Apps, Gmail, Emails, Google Email Uploader, Tools