TL;DR:
- For the show it was more for the audience sake than anything, to see where they landed.
- Fire is always a great intimidation tactic in combat, even if it offers no real decisive advantage beyond simply intimidating your enemy.
- Flaming arrows are tracers for the archers to adjust fire when needed.
Flaming arrows were used in medieval battles, but not as often as tv/movies would like you to believe. The primary use was to burn towns/defenses and force the defenders to have to fight a battle on two fronts (defend against an enemy and put out spreading fires).
On the side of the offender ignited arrows were pretty much used as an intimidation tactic. Throughout history you can see and imagine the fear that 'fire' would bring to the battlefield. However, the arrows were typically no where near as accurate; even worse when some had a small jars, boxes, and tubes filled with oil or somethings that would break upon impact in the hopes to spread the flames across the target.
But the other benefit to flaming arrows at night is for the archers themselves. Flaming arrows were likely the first instance of tracer rounds. Shooting arrows during the day it fairly simple to see where they are landing, but at night they would disappear. Fire solves that problem.
And while it is possible the enemy would see the arrows coming and avoid them you have to remember that:
1. They can see arrows during the day... did it really help?
2. There are a hundred or more of them coming at you and you are likely bunched up in a formation.
3. Arrows are cheap to produce and it is worth the waste if you miss; and totally worth it if you hit...
4. The fact that they are shooting arrows at you means you can't hit them with a sword and you need to run from a to b while avoiding them, causing more stress/pressure/fatigue.
But yeah... it was pretty much so that you could see them.