Using Single means that you expect exactly 1 result. When more results are returned, Single throws an exception. You can use First to get the first element or Last for the last. For several elements, you will need to iterate over the results and access each of them individually.
If the matching result does not exist, you can use SingleOrDefault to return null or the default value of the type used.
Is queryUserResponseData XElement or XDocument? If it's an XDocument, you need to access the XML root first, for example:
var userData = queryUserResponseData.Root.Elements("user") .Single(u => u.Element("username").Value == userName);
Also, searching for User1 or User2 in your example will work. However, if you were looking for User3 that does not exist, Single will throw an exception. In this case, you should use SingleOrDefault:
var userData = queryUserResponseData.Elements("user") .SingleOrDefault(u => u.Element("username").Value == "User3");
source share