My 2 cents.
AP Glyphs (usually scaling is best) are good if you expect to be able to harass your opposing laner without retaliation. ex. Ryze vs Lux: Lux can constantly poke at Ryze and he usually won't be close enough to fight back.
If it's alot of back and forth trades, Flat MR glyphs are quite useful as they will reduce more damage than AP glyphs will give (in general).
CDR Glyphs are my favorite glyphs if I can get away with them. Usually take them against physical damage laners or the same situation as AP Glyphs.
Also, I'd say Flat AP is best if you think you can kill your enemy early. Cassiopeia is probably the best example of this.