Yes there is:
%s/import\s*\zs.*/\=join(sort(split(submatch(0), '\s*,\s*')),', ')
The key elements are:
To respond to the comment, if you want to apply the replacement in a visual selection, this would be:
'<,'>s/\%V.*\%V\@!/\=join(sort(split(submatch(0), '\s*,\s*')), ', ')
New key elements this time:
:h /\%Vwhich states that the next matching character must belong to the visual selection:h /\@!, , ( \%V), . .
BTW, s i_CTRL-R_= ( ยต):
:xnoremap ยต s<c-r>=join(sort(split(@", '\s*,\s*')), ', ')<cr><esc>