Can I avoid nested for loop in this case?
I've seen, that you made up this code as an example, so I hope, that this is not your production code: 

public static ArrayList&lt;String&gt; getNamesCorrespondingtoUser(String userName)
        throws Exception {
    ArrayList&lt;String&gt; names = new ArrayList&lt;String&gt;();
    if (userName.equals("user101")) {
        names.add("UBSC1");
        names.add("HDBG1");
        names.add("GHYU1");
    }
    if (userName.equals("adminuser")) {
        names.add("UBSC1");
        names.add("HDBG1");
        names.add("GHYU1");
    }
    return names;

}


If you take a look at both blocks, they are the same, aren't they?
But for further improvement, I would suggest working with a Map where you have usernames as the key and the according List of Names as the result.

Second: I would reccomend you to take a look at Google's Guava Library esp. the section about predicates .

Third: I am wondering, how you could retrieve any correct item. As far as I can see your names have to be unique to resolve the correct items. The collision rate for (nick-)names is generally high. So it would be better to switch to some ID-mechanism. 

Fourth: The task is in itself nested; you need to iterate over a list of items and over a list of users. So you couldn't "avoid" a nested loop. Okay: If you let a database do the magic, you didn't loop at all - the database does. But I think, that is not the answer you wanted.