Try this one -:
SELECT t2.userid,
stuff((
SELECT ', ' + t1.tags
FROM table_name as t1
where t1.userid = t2.userid
FOR XML PATH('')
), 1, 2, '')
FROM table_name as t2
GROUP BY t2.userid
I hope this helps you out.
Check the example -:
http://www.sqlfiddle.com/#!3/85c89/6