When did 'virgin' start referring to non-alcoholic drinks
Solution 1:
It may be an extension of Virgin Mary, which is straight tomato juice (as opposed to a Bloody Mary, which has vodka). OED cites usages going back to the mid-1970s, under its entry for virgin:
Virgin Mary n. [after Bloody Mary n.]
chiefly U.S.
a glass of tomato juice1976 W. Goldman Magic ii. 90 Some girl wanted a Virgin Mary. The waiter nodded.
1977 J. Philips Five Roads to Death i. 11 A waitress approached the table. ‘A Virgin Mary... A Bloody Mary without the vodka.’
1981 T. Heald Murder at Moose Jaw ix. 103 Crombie ordered himself a straight tomato juice with..Worcester. The Colonel did not, Bognor noted with approval, refer to the drink as ‘a Virgin Mary’.
Once a Virgin Mary had been established (as a pun of sorts) from Bloody Mary, it's not hard to imagine how, say, virgin daiquiri would have followed.
I don't know if the term goes back further than that.
Solution 2:
I think the original virgin cocktail was the Virgin Mary, created as an alternative to the Bloody Mary but without Vodka. Bloody Mary refers to Mary I of England, so I guess it made sense to name the alternative after another, gentler historical Mary.