No need to disconnect the battery to replace a headlight bulb.
Disconnecting the battery has re-set the vehicles onboard computer and although I've never heard of one stalling before, (which seems to indicate another unrelated problem), however it is possible that with resetting the onboard computer that the vehicles needs to relearn driving patterns, etc. Drive it for about a bit and see if it clears up. In the meantime, make sure you didn't accidentally knock loose a vacuum line, as this can cause stalling too.