Greetings and what an important question. I'll give you the research based answer in a concise a way as possible. The bottom line is that parents/primary care givers ultimately have the most influence on their children. One of the very best predictors of a child's self-esteem, school success, and a rewarding life is a secure, open, and loving relationship with his or her parent (also known as attachment). A child with a secure attachment carries the feelings of being loved, respected, and guided by their parent through their entire life-span. When a child (or grown adult) knows they are their parents "sun, moon, and stars," they can draw on this feeling in times of difficulty or stress. Here's a great article explaining attachment: http://www.education.com/magazine/article/attachment_parenting/
It's important to know that having a secure attachment is not the same thing as permissive parenting, and parents who promote a secure attachment also discipline and use "tough-love" when needed.
The research also shows that a child's peers begin to have a very strong, if not stronger influence than parents beginning around age eight to nine through the teen years. However, as parents we can help our children to make decisions on choosing their friends and peer group (and also moderating the amount of time they are exposed to television and violent video games).
I think the answer, especially for young children, is "whoever spends the most time with them". So I think kids who spend the majority of their time interacting with their parents and other family members are most influenced by what they see, hear, and experience during that time. Kids who spend hours a day in front of a TV are most influenced by what they see there (the good, the bad, and the ugly!). Kids who spend most of their time at school and/or daycare are probably most influenced by that (not saying that's a bad thing by the way...research shows that good day care can be good for kids just as bad day care can be bad for them.)