Evolution certainly played a part in the color of our hair. Just as our skin color is determined by where our ancestors live, with darker skin colors coming from sunnier places and lighter skin colors coming from cloudier places, hair color was also determined by evolution, like all other traits.
Evolution is responsible for literally every feature we have, including hair color. Hair color is one of the most obvious examples of evolution adapting to sun exposure, with lighter hair showing up in places that get less sunlight throughout the year. Random mutations resulted in certain colors being better for certain areas, and evolution selected those colors over time for those areas.
Yes, evolution determined the color of our hair. As people evolved, their hair color may have changed due to changing climate and weather conditions. The hair color that people originally had was determined by the time period in which they lived and the weather conditions at that time. In addition, survival of the fitness may have caused more people of certain hair color to be present today.
Personally, I am not a proponent of evolution at all. I do not believe that people evolved from another species. I believe that we were created. Therefore, I don't think evolution determined human characteristics over time. I believe people were created with variety including different hair colors, eye colors, heights, and sizes. I believe our physical traits are genetic and we inherit hair color or eye color from our parents, but I don't think evolution played a role in developing hair color.