Lily and James are Harry's parents. Even though they live mostly in the background of Harry's life, they are important to the story. Of course, their murder by Voldemort is what made Harry the Chosen One; The Boy Who Lived. While everything began with Lily and James, they are also ever-present symbols throughout their story, from The Sorcerer's Stone to The Deathly Hallows.
One important aspect of James and Lily's function throughout the books is the fact that Lily sacrificed herself for Harry. When Voldemort entered the room with Lily and Harry, she threw herself between his killing spell and Harry, and her intense love for her son made the spell bounce back and strike Voldemort, weakening him into dormancy. Voldemort had no idea that such love existed; he had no idea that it could stand against the most powerful spell in magic. As Harry grows throughout the series, he learns that love is the best weapon against Voldemort's evil.
Lily and James also symbolize Harry's greatest desire and his most profound loss. In The Sorcerer's Stone, when Harry comes upon the Mirror of Erised, in which wizards and witches see their greatest desires, he sees Lily and James.
When we learn more about James and Lily, we realize that James was actually a very complex person. Harry has long looked up to him and revered him, but James was also capable of cruelty; he was known for being at least somewhat of a bully at Hogwarts. Lily, on the other hand, was always gentle, loving, and brave. They expose the complexity of humanity; how one can be noble yet cruel and another can be full of courage and love.