The herpes virus is thought to be transmitted at times when there are no visual symptoms (sores). This is called asymptomatic shedding. The virus is transmitted in the exchange of body fluids; in the case of orally located herpes, that would be saliva and/or blood (from the sore).
Presumably, the sun would have to hit the area around the mouth; the virus stays attached to the nerve cells in the area affected, and it would be the stimulation of those cells by the sun that would activate the virus. I cannot tell from what I’m reading on the subject if this means outbreaks can be reduced by use of sun-blocking chapsticks, etc.
#2. I get cold sores on my lips and I’m outside quite a lot. I’ve been able to greatly reduce the outbreaks to 1 or 2 times a year by using using a lip balm with sun screen protection. Something like a SPF 8 or higher. I reapply frequently. Since using lip balm seems to reduce the number of outbreaks on this statistical sample of one, I’d say that the sun needs to hit the lips.
My statistical sample of one associates them with any type of lip damage/stress; chapping, rubbing, wind, cold.