Sunlight wouldn't be enough energy to carry out the reaction between n-hexane and bromine. The energy source, however, may have been written has "hv" as a way to describe the radiation or high-wavelength energy for the reaction, which is possible in a more controlled environment.
In this scenario, the reaction between n-hexane and bromine is a bromination reaction--generation of a bromine radical and attaching one or more bromine molecules to hexane. It is more likely that it will attach to a secondary carbon rather its primary, and its location of attachment between the available secondary carbons would be a mixture.