As 5banger pointed out, you may have a problem with the A/C compressor speed sensor.
A loose belt is detected and the A/C compressor is shut off. You pull over, stop and retstart motor and A/C system and it'll work again for awhile until the speed sensor once again detects a problem. There's alot of talk about this in the archives. Do a search on "speed sensor".