It's more to make them look cool for the viewers. Now an in universe answer might be because of the mixing of the reactants that occurs after the weapon is armed and fired.
My guess would be that it has something to do with a torpedo traveling at warp which would distort the look of the torpedo and the light is most likely some kind of subspace distortion since a torpedo would have to be close to regular space to be effective instead of going deep into subspace for normal warp travel. A little side note there should be no mixing of any reactants since the matter and anti-matter should not combine until the torpedo detonates.
no, they do use M/AM as propellant
Photon torpedoes do not travel at warp speeds because if that were true no one would be evade them which is obviously quite possible. In addition a torpedo takes around 1.02 seconds to arm itself so it would be stupid for them to travel at faster than speeds. Photon torpedoes are so named beaude they employ a magno-photonic energy field to contain the matter/antimatter reaction which acts as the torpedoes propellant. If matter/antimatter reactions as you claim then what is the weapon delivery system since there not a single that shows them with a thruster or booster engine?
You might try looking it up on Memory Alpha before one makes statements like these.
Before you go running your mouth why don't you read Memory Alpha yourself and you'll see the first line in the photon torpedo article states they are warp-capable matter antimatter weapons. The torpedo sustains a warp field handed off to it by the ship at the very end of the torpedo tube. Oh and before I forget just like any weapon today the torpedo would be armed by the computer before being launched and then detonate by a timer, by a remote command, or on contact depending on how the torpedo is configured. It does say it takes 1.02 seconds for the reactants to mix which is ridiculous because antimatter would react with any matter it comes in contact with instantly once the magnetic field is down.
The "warp capability" of the means it can be fired while a ship is at warp other wise it does not move a warp speeds.
"The propulsion system of the torpedoes is a warp sustainer engine. The engine coils of the torpedo grab and hold a hand-off field from the launcher tube's sequential field induction coils. A miniature matter/antimatter fuel cell adds power to the hand-off field. When launched in warp flight, torpedo will continue to travel at warp, when launched at sublight, torpedo will travel at a high sublight speed, but will not cross the warp threshold"
The torpedo reactants begin mixing during flight not at detonation, this is possible because the matter/antimatter reaction is tempered by the photo-magnetic field like dilithium crystals in a warp reactor
"As a safety measure the matter and antimatter are kept initially completely separated in the warhead. Only after the launch they are mixed during flight in the combiner tank, while still separated from each other in magnetic packets. This mixing takes a minimum of 1.02 seconds"