Try this.
public static string GetUserAccountFromList(SPListItem item)
{
SPFieldUserValue fieldValue = null;
SPUser user = null;
SPFieldUser UserColumn = (SPFieldUser)item.Fields.GetField("YourUserFieldName");
fieldValue = UserColumn.GetFieldValue(item[fieldName].ToString()) as SPFieldUserValue;
if (fieldValue != null)
user = fieldValue.User;
return user;
}
Enjoy DDIBA~!

Try this code...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;
namespace YourProject
{
public class LoggingService : SPDiagnosticsServiceBase
{
public static string DiagnosticAreaName = "Your Diag Area Name";
protected override IEnumerable<SPDiagnosticsArea> ProvideAreas()
{
List<SPDiagnosticsArea> areas = new List<SPDiagnosticsArea>
{
new SPDiagnosticsArea(DiagnosticAreaName, new List<SPDiagnosticsCategory> { new SPDiagnosticsCategory(DiagnosticAreaName, TraceSeverity.Unexpected, EventSeverity.Error) })
};
return areas;
}
public static void Log(string source, TraceSeverity traceSeverity, EventSeverity eventSeverity, string logMessage)
{
SPDiagnosticsService.Local.WriteTrace(0, new SPDiagnosticsCategory(source, traceSeverity, eventSeverity), traceSeverity, logMessage, null);
}
}
}
And use this in your code like this...
private void YourMethodOrFunction()
{
try
{
Do... Run...
}
catch (Exception ex)
{
LoggingService.Log("Your Application Name", Microsoft.SharePoint.Administration.TraceSeverity.High, Microsoft.SharePoint.Administration.EventSeverity.Error, ex.Message);
}
}
And check your Log file in Logs folder.
Location: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
Enjoy~! DDIBA~! 
public static SPUser GetSPUser(SPListItem item, string key)
{
SPFieldUser field = item.Fields[key] as SPFieldUser;
SPFieldUserValue fieldValue =
field.GetFieldValue(item[key].ToString()) as SPFieldUserValue;
if (fieldValue != null)
return fieldValue.User;
}
Enjoy DDIBA~! 
This code demostrate how to set people editor control values from a sharepoint list
SPSite site = SPContext.Current.Site;
SPWeb myweb = site.OpenWeb();
SPList mylist = myweb.Lists["MyList"];
SPQuery query = new SPQuery();
query.Query = "<Where><Eq><FieldRef Name='ID'/>" +
"<Value Type='Text'>" + e.Value.ToString() + "</Value></Eq></Where>";
SPListItemCollection items = mylist.GetItems(query);
foreach (SPListItem item in items)
{
try
{
this.txtTitle.Text = item["Title"].ToString();
this.txtStart.SelectedDate =Convert.ToDateTime(item["EventDate"].ToString());
}
catch (Exception ex)
{
Response.Write(ex.Message.ToString());
}
ArrayList _arrayList = new ArrayList();
SPFieldUserValueCollection users = item["People"] asSPFieldUserValueCollection;
if (users != null)
{
foreach (SPFieldUserValue user in users)
{
PickerEntity _pickerEntity = new PickerEntity(); // PickerEntitiy use using Microsoft.SharePoint.WebControls
_pickerEntity.Key = user.User.LoginName;
_pickerEntity.IsResolved = true;
_arrayList.Add(_pickerEntity);
}
pplEditor.UpdateEntities(_arrayList);
}
}
ENJOY DDIBA~! 
This code demostrate how to get people editor control values and insert a sharepoint list
SPWeb mySite = SPContext.Current.Web;
SPListItemCollection listItems = mySite.Lists["myList"].Items;
SPListItem item = listItems.Add();
item["Title"] = this.txtTitle.Text.ToString();
item["Location"] = this.lblLocations.Text.ToString();
item["EventDate"] = txtStart.SelectedDate ;
string[] UsersSeperated = pplEditor.CommaSeparatedAccounts.Split(',');
SPFieldUserValueCollection UserCollection = newSPFieldUserValueCollection();
foreach (string UserSeperated in UsersSeperated)
{
mySite.EnsureUser(UserSeperated);
SPUser User = mySite.SiteUsers[UserSeperated];
SPFieldUserValue UserName = new SPFieldUserValue(mySite, User.ID, User.LoginName);
UserCollection.Add(UserName);
}
item["people"] = UserCollection;
item.Update();
Enjoy DDIBA~! 
I'm using the SharePoint PeopleEditor to select a user and when the user is selected I want to populate a few fields with information about that user, I retrieve the data from AD. The problem I had was how do I make the PeopleEditor send a signal to my code that a value has been set?! There is no event on the PeopleEditor control which is fired when a value is set.
I first asked myself this question about a month ago, but as I have been unable to find an answer I added a button to my form which says "Retrieve Userinformation". This is not the normal way of UI design and during a demo for the customer today they made a remark about it, so I decided to take another look at this problem.
It took me almost an hour to realize that there is a property called AutoPostBack on some server controls. When you set this property a Postback will be generated when a value is set in the control. As you may understand from my lack of knowledge in this area ASP.NET UI design is not my primary competence, but in most cases I know enough to get the job done.
<SharePoint:PeopleEditor AutoPostBack="true" ID="peUser" runat="server" />
In the case of the PeopleEditor this means that when you type a username and click Check names (or hit enter) or use the Addressbook to select a user you will receive a generic postback, no specific event i raised by the page is reloaded. Therefore you can have code in your Page_Load which checks if a value has been selected and take some action.
string accountName = null;
if (peUser.ResolvedEntities.Count > 0)
{
PickerEntity entity = (PickerEntity)peUser.ResolvedEntities[0];
accountName = entity.Key;
int pos = accountName.IndexOf('\\');
accountName = accountName.Substring(pos + 1);
// take some action based on accountName
}
In essence the AutoPostBack acts as an event generator which lets you perform an action when the value of the control is set.
Enjoy DDIBA~! 
Get text from People Editor using JQuery Javascript.
$('#' + '<%=yourPeopleEditorID.ClientID%>').keyup(function () {
alert($(".ms-inputuserfield #content").text());
});
$('#' + '<%=yourPeopleEditorID.ClientID%>').focusout(function () {
alert($(".ms-inputuserfield #content").text());
});
Enjoy DDIBA~! 