Superficially, 딴 meaning (an)other sounds like a shortened version of 다른 (different). Is there an etymological relationship or is the similarity in sound and meaning just a coincidence?
According to the 표준국어대사전, the etymological origin of 딴 is:
ᄠᆞㄹ+ㄴ -> ᄠᆞㄴ -> 딴.
Given that the 아래 아 (ᆞ) often became ㅏ (hence its name 아래 아), and the fact there was a ㄹ in the original word, and that it was common for the letter ㄷ to strengthen to ㄸ, I'd say it seems pretty likely that they have the same origin. But they don't mention explicitly a relationship.
There is an adjective '따다' which means '다르다' mainly used in a 함경 (in North Korea) dialect. '딴' seems to be derived from this adjective.
The important thing is '딴' and '다른' don't have the exact same connotation. '딴' is used for a rather completely different thing while '다른' is used for a different thing, but it is a little related. In other words, '딴' is more emphatic than '다른'. It's not easy to tell the difference as there is very little difference between them, but I will try.
딴 생각 말고 공부나 해. (Literally) Don't think about completely different (unrelated) things and study.
다른 생각 말고 공부나 해. (Literally) Don't think about different (unrelated) things and study.
The first sentence is used when a speaker worries that a listener might think about things that are completely unrelated with studying. Therefore, using the first sentence is more emphatic and strong.
너 지금 딴 생각 하지? (Literally) Are you doing a completely different thinking?
너 지금 다른 생각 하지? (Literally) Are you doing a different thinking?
The linked 우리말 바로쓰기 on "딴 사람 vs 단 사람" have some more examples. But you will find it very difficult to understand the subtle difference.