I have a similar setup, at home I have a single monitor and use the laptop screen and the monitor and at work I have two monitors and don't use the laptop screen. I don't use XMonad itself to change the resolution, I use a program called
autorandr, all you need to do is configure your resolution with xrandr and then save the profile with autorandr and it automatically detects the displays and the profile you saved for them. XMonad automatically adapts to this, changing the resolution and moving xmobar to the primary display.