Adding my experiences with the Mega SD and light guns to this thread rather than creating my own: I have a Sega Light Phaser and a blue Konami Justifier, a model 1 Genesis and obviously a CRT that works with lightguns.
I have been able to use the Phaser with the 2nd player port hacked versions of the Master System games. I wasn't able to run the non-hacked games, because you can't have the gun in the 1st player port and select the game and I couldn't get the gun to work after selecting the game. After getting the hacked games going, I had an issue where the gun fired consistently to the right of the barrel with my cheap aftermarket composite cable and cheap composite switcher. For whatever reason, upgrading to HD Retrovision component cables (also through a cheap switcher) solved that problem. So the light phaser works pretty much perfectly now.
For the Justifier, initially I had a lot of problems using it with the Mega SD. Then I downloaded the light gun manual and it said that the gun shouldn't be plugged in at all when you're not playing a compatible game. And, indeed, I found that leaving the light gun plugged into the 2nd player port even messed up the Mega SD menu sometimes, causing crashes and unresponsiveness. Also, I had some dead spots during aiming, almost always the lower half or sometimes third of the screen that would not register shots. I discovered that most Sega Light gun games don't use the lower half of the screen that frequently. However, it seems like the problems might have been solved by waiting until booting up the games to connect the Justifier to the player 2 port.
I have some more testing to do with Sega CD games, but I will say that Mad Dog McCree 1 + 2 are possible to successfully play with the Justifier. I tried to play them with a controller and got nowhere. And of course Snatcher is more fun with a light gun. Lethal Enforcers 1 + 2 are good, but I wouldn't say great. I do wish that the next revision of the Mega SD firmware would make having the Justifier connected during menu selections possible, as it is a pain to have to plug the gun in while booting up the game, but I understand that it's probably not a priority.
Oh, I also should say that I tried most of the suggestions above and they didn't seem to make a difference in my case. I messed with brightness, bypassed the switch boxes and tried the graphic speedup switch with no changes in performance. Also, I have a 32 inch Sony Trinitron flat tube TV, as I've seen other people claim that the flat tube can adversely affect light gun performance, but I don't have access to a non-flat tube at the moment, so I can't say whether it makes a difference. I will say that I have Guncons, both 1 and 2, and they are perfect on the screen. The phaser is now near perfect. My NES Zapper also performs flawlessly. The Justifier shots aren't perfect, but they are tightly grouped.