From Enterprise, we know that the Andorians had superior starship technology to Earth (shields, warp engines, weapons) at the time that the Federation was founded. The Andorian's Phase Weapons were shown to be blue, in contrast to the red/orange of the ones used by Earth Starfleet. If, then, the Phasers used by the Federation in the first several decades after its founding were based on Andorian designs, this would explain why they were blue up through the TOS era.
However, when the Constitution class was given its big refit in the early 2270s, one of the changes was to boost Phaser output by powering them directly from the Warp plasma instead of from the ship's EPS conduits (this being the reason for the Phasers going down when the Warp engines malfunctioned in TMP). This change might explain the beginning of the shift back to red/orange Phasers, since the Andorian design was no longer dominant.