日本に勉強しに行く simply means "I'm going to Japan to study", but lacks any specifics like what you are going to study (though this might be obvious depending on the surrounding context), or how long are you going there (drop by for an afternoon, study, then leave? A few days? weeks? etc.)
私は日本に留学するつもりです means "I intend to study abroad in Japan". Although less is said, a lot more is implied. First, a lengthy period of time. You don't go study abroad for a few days or a few weeks (possible, I suppose, but not common); studying abroad is usually measured in semesters or years. Second, when studying abroad in a country where the native language is not the same as yours, one is most likely studying abroad in this county specifically to study the language. In this case, Japan is the only Japanese-speaking country in the world, so saying you're going to study abroad there implies you're going to study the language. If it were something else (assuming you were already fluent enough in Japanese, and you were going to do collaborative doctoral studies in some field), you'd need to explicitly state what the field was. Likewise, if your native language is English and you say you're going to study abroad in England, you're not going to study the English language, and saying
イギリスに留学する is ambiguous about your field of study.