They are pretty similar!
I'd say "every now and then, now and again, occasionally, once in a while, on occasion" can all be used interchangeably- to mean the occasion is rare and spread apart.
"Sometimes" COULD mean the same thing but is less dramatic/ doesn't apply the events being as spread apart as the rest. For example, one could say...
I usually read before bed, but sometimes I watch a show before bed, and on occasion (interchangeable with once in a while, every now and then, etc.) I just go straight to bed without doing either. Does that help?
Oh and they all can be used pretty casually, but the one that would be most appropriate in formal situations too is probably "on occasion" or "occasionally." The others are more exclusively casual.