Short answer: you should not be too worried about the sun in the later afternoon.
Long answer: there are several risk factors to consider when running in the heat, and if you properly stick to them you will remain healthy and minimize the potential health risks of sun exposure.
Scientifically speaking there is no consensus regarding which component(s) of sunlight (UVA/UVB/UVC) are carcinogenic. Since UVA/UVB/UVC proportions can change drastically based on the time of day, that means we really have no way of knowing what time of day presents the highest risk to our body as far as skin damage and cancer are concerned. Because of this, you should not consider UV exposure when deciding what time to run.
That being said, whatever time you do choose to run you should make sure to take adequate precautions by applying sun screen before leaving. If the sun is out--even if it isn't very hot--you are at risk and need to use sun screen.
To avoid heat stroke you want to stay properly hydrated. That means drinking water before, during, and after your exercise. Listen to your body and drink as needed. If you are doing a prolonged exercise, consider bringing a sports drink like Gatorade to help replenish the salts and minerals that your body is craving.
Some additional pointers to avoid heat stroke are:
- Run in shade
- Wear light clothing
- Splash water on your face
- Don't over-exert yourself
If you are accustomed to running in fair conditions and you transition suddenly to hot weather exercise, you will notice that it is much harder to keep up with your previous pace. Running in hot weather takes more effort from your body and as a result you cannot expect to perform at your peak the way you would in fairer conditions. Keep the heat in mind when doing exercise and make sure not to exhaust yourself.
Taking all of this into account, you can see that there is nothing intrinsically dangerous about running in the heat... so long as you take the proper precautions. Therefore, whether you choose to do morning, afternoon, or evening runs, as long as you plan accordingly you will do fine.