In a word: DON'T! The reasons are complex, but if you REALLY want to rename your home folder from something like jonathanqsmith to just jsmith, OSX 10.4 and earlier don't have a built-in way of doing this. You'll have to use a 3rd party program...
The best program I have found to accomplish this task is ChangeShortName It does all the necessary work behind the scenes to make the change for your pre-Leopard Mac.
If you are running OSX 10.5 you have another option, although it is not one that I, personally, have tested. I can't vouch for the effectiveness of this so proceed at your own risk.
If your home folder resides on a server and you don't like your home folder name, you'll have to buy the system admin lunch and beer. :)
What do you do if you've already changed it and now nothing works right?
If you just changed it very recently and haven't created or saved any documents or used Mail, then quickly change it back to EXACTLY how it was before then restart the computer. With luck, you won't have lost anything.
If you changed it a few weeks ago and you've been living with the loss of your files, call your friendly neighborhood Mac support person and they should be able to get hands-on with the computer to see how extensive the damage is and get you back up and running.
Warning: Technical details ahead
If you REALLY want to know why you can't just rename the home folder like you can for any other folder you create, you'll have to understand that the UNIX underpinnings of MacOSX are quite picky and there are many things behind the scenes that you, the user, shouldn't ever have to worry about.
What is a User? In MacOSX each user have multiple components to identify itself to parts of the system and to human users.
- Real name. This is the human-readable Jonathan Q. Smith.
- username aka "shortname": This is what you would normally login with or might be your email address before the @ such as jsmith.
- UID aka UserID or UniqueID: this is a numerical code that the system knows you by... usually something like 501 or 502 etc.
Every user on a desktop, laptop, or server Mac will have a unique UID number that, along with the Real name and username, is stored in a database on that computer. The database remembers the password you have set, your account picture (if set), and your home folder and a whole bunch of other stuff. The first time you turn on your Mac and create that very first account, this is where you will need to make the decision of what your username will be. Do you want it to be jonathanqsmith, jsmith, or fuzzycat? When you set it here, it creates a home folder in /Users with that name. it then writes all the pertinent info to the database so it will know, when you login, where your home folder can be found with all your files.
If you just change the name of your home folder from jonathanqsmith to jsmith, the database needs to be told where your folder is because as far as it knows, it is still looking for it at /Users/jonathanqsmith. Following the links above tells the database of these changes.