I just saw the movie recently. I thought a lot about it, in particular about this boy with the scar and I couldn't figure it out. I think this boy appears four or three times and in all scenes you can barely see his face, so it was even hard to recognize who it is.
The scar on the back of the boy's head is likely inspired by Terrence Malick's own experiences (the source of many of the elements in the film). As a burn scar, it probably refers to Malick's brother Chris, who obtained some burn scars in a car crash (according to the Boston Review). In this sense, it is an autobiographical flourish.
In the context of the film, the boy is a friend of Jack's who was burned in a fire. The burn scar serves as a meditation on one of the large themes of the film: if there is a caring, loving God in the universe that gave genesis to life, then why do bad things happen to good people? This theme is highlighted by Jack’s question, “God, how could you let that happen?” The idea of misfortune happening to a friend, while impersonal to Jack's character, is one that plagues him during his early life, serving as a point of development for his character and struggles with hopelessness. It is at this point in the film where the tranquility of the beginning gives way to the chaos that follows, as Jack enters his teenage years. Eventually, this emotional frame manifests in the present day, where interpretations of what Jack does (commits suicide, or chooses not to knowing some inner peace) comes to a close.