May an uncertificated pilot log non-PIC flight time for future certification? Let’s suppose I as a PIC take a friend up flying with me and this friend does not have a pilots license.  Now let’s suppose I teach him how to control the airplane and let him fly for a while.  I even go on a cross country flight and let him fly most of it.  

Looking at the regulations regarding aeronautical experience for a private certificate, CFR 61.109, it states that the pilot must log 40 hours total flight time, 20 hours of instruction and 10 solo.  CFR 61.51 outlines documenting aeronautical experience and has caveats for the type of flight time but nothing for this type of situation however, 61.109 does not stipulate that all of the flight time come from solo or instruction.  

So here is the question.  May an uncertificated pilot log non-PIC flight time and use it towards a certificate when another pilot lets him fly the plane as the sole manipulator of the controls?
Your friend can't log any time because he isn't licensed and qualified to fly the aircraft and assuming that you aren't a CFI then he isn't receiving training either. He's just a passenger, although if he wants to record the time for his own purposes that's fine, it just doesn't count for anything as far as the FAA's concerned.

First, 14 CFR 1.1 says that flight time is time acting as a pilot, not just time in an aircraft:


  Flight time means:  
  
  (1) Pilot time that commences when an aircraft moves under its own
  power for the purpose of flight and ends when the aircraft comes to
  rest after landing;


So your friend needs to log time as a pilot. Obviously without a certificate there's no way to log PIC or SIC time, so that leaves training time. The regulations for that are in 14 CFR 61.51 (my emphasis).


  (h) Logging training time. (1) A person may log training time when
  that person receives training from an authorized instructor in an
  aircraft, flight simulator, or flight training device.