When I add a new friend to Gmail chat, sometimes my friend's email address is added as their contact name, such as firstname.lastname@example.org. I personally like to have the name of all my chat friends in my chat list so I don't get too confused as to who's who. To change this, I used to go into contacts, select the contact profile, add the name of my friend, and then save it.
But now with the new version of Gmail (launched for Firefox 2 and IE7) you can make edits to Gmail contacts directly from the chat list. I find it to be a great time saver. All you have to do is hover your mouse over one of your contacts to prompt a pop-up with contact details. If you just click on the contact name, it will automatically become an editable field. Simply type in the desired name and hit "enter." Your changes will save the name in your chat list as well as in your contacts.