Building a torpedo boat focusing on rapid fire of multiple warheads? Go photon. The interaction between the short CD (6 seconds) and Projectile Warfare officers allows them to maintain a greater rate of fire with less weapon slots filled than any other torpedo.
Building a boat with a torpedo strictly as a finishing punch? Go quantum.
Photons have a slightly higher DPS because they fire quicker: stock MK XII Photon does 458 and the Quantum does 390. Quantums do more direct damage: 3313 versus 2980.
It really comes down to a question of play-style.
STO is about my Liberated Borg Federation Captain with his Breen 1st Officer, Jem'Hadar Tactical Officer, Liberated Borg Engineering Officer, Android Ops Officer, Photonic Science Officer, Gorn Science Officer, and Reman Medical Officer jumping into their Jem'Hadar Carrier and flying off to do missions for the new Romulan Empire. But for some players allowing a T5 Connie to be used breaks the canon in the game.
Yeah, it really depends on your playstyle and chosen buffs. For instance, I use Quantums on my science ship, fore and aft. I fire one, turn around, fire the other, and by the time I've turned back around, the fore-facing torp bay is usually recharged (or just about).
Also, Photon DPS being higher doesn't take into account using abilities like High Torpedo Yield or Torpedo Spread. Assuming you always use HTY as soon as it's up, the damage/DPS difference seems to fall in favor of quatums.
DPS also assumes that you're using one torpedo bay, and always use it as soon as the recharge has worn off. This doesn't take into account turning, healing, activating other BOff powers, or simply NOT using them because an enemy's shields are still at full power. I'm not sure whether it takes into account having, say, two forward torpedo bays and firing them alternately (as the "Shared cooldown" is less than the recharge time), but I doubt it (kind of like how a beam weapon's listed DPS doesn't take into account that you'll be losing 10/20/30 weapon power by firing it and another weapon at the same time).
So basically, if you know you're going to be using torpedoes all the time, go Photon. If you use them a fair amount but find yourself sometimes skipping using them in favor of doing something else (healing, waiting for a torpedo buff to finish recharging, etc), go quantum. If you only use torpedoes situationally, go with something heavier-hitting like Plasma or Chroniton.
Don't forget projectile weapon officers. PWO's can make photons "chain fire", i.e. a torpedo every 2 seconds. This is because a purple PWO's cooldown reduction is 5 seconds compared to a Photon's basic reload time of 6 seconds. Throw in the 1 second system cooddown on torps to get torp-every-2-seconds. You can get out a lot more photon torps than you can quantum torps if you are using PWO's.
This especially starts to be a thing when you start messing around with High Yield, because each torpedo in a salvo can trigger each PWO... If you are a torpedo boat, High Yield 2 is more like High Yield 3.5 because your salvo is almost guaranteed to be chased by a bonus full-damage torp on the end.