Hi,
10 to 50 and
between 10 and 50 are two ways to say express the same concept, so I in my opinion there's no difference.
Another expression similar to the ones you used is
from 10 to 50, but I'm not sure if you can use that in your sentence. In other words, I'm not completely sure you can say something contains from 10 to 50 milligrams of caffeine, but I'm sure you can say the content of something varies from 10 to 50 milligrams.