Is there any difference between the phrases? For example:
If you can come earlier, it is all the better.
If you can come earlier, it is so much the better.
By the way, do I have to include it is as in it is all the better?
The difference is regional. I personally would only tend to say "all the better" as that is what was used most commonly around me when I was younger. However both phrases mean the same thing and can be used interchangeably.
By the way do I have to include it is as in it is all the better?
Again no It is perfectly acceptable to say:
If you can come earlier, all the better
If you can come earlier, so much the better
(Note: I've added in the word you to the sentences as it was missing.)