How are his language skills? I find with DS it helps to talk him through what we're going to do and what will be expected of him (and what will happen if he doesn't cooperate) before we go somewhere new (or even if it isn't new). So he knows that now he's in a swimming class without mum or dad, he has to do what the teacher sauys (or we'll have to go home) and he has to come straight out again - no playing in the shallows because mum has to hold DD (or we won't be able to trust him to do the class again).
It may be the familiarity with a very predicatble routine that helps him at daycare. Also I think some kids particularly will try very hard to please when they're with other people, so much so that they have to cut loose and relax a bit with mum & dad.
DS has been 'experimenting' with tantrums a lot lately. Whereas in the past it was generally only when he was very tired or hungry, now he's really putting it on sometimes. I have learnt I must not get angry or shout. It's very hard sometimes (with no sleep and given some of the thigns he does) but if I do that it gets a thousand times worse. Other than that I just sort of stand there, head in hands, praying for a lightening bolt or something.