If the user name is an email address, you should generally not reveal this, for privacy. An email address is linked to an individual, and whether someone uses a particular site is private information - consider Ashley Madison as an example. It can be a little tricky to avoid email enumeration when you consider functions like registration and forgotten password, and side channels like timing. Interestingly, some major sites (e.g. Google) don't follow this principle.
If the user name is a handle the user selects themselves, it's ok to reveal this. A handle in itself isn't liked to an individual - I'm paj28 here on Stack Exchange, but on a different site paj28 could be someone else. This is why most sites that allow peer-to-peer communication have users pick a handle. In fact, it's normally impossible to avoid handle enumeration because the registration function has to block duplicate handles.
A minor issue with user names being non-secret is a particular kind of denial of service attack. Most apps implement a password lockout policy to defend against password brute force attacks. This is usually based on the user name, which means that someone who knows the user name can make repeated invalid logins and cause a denial of service. Some sites use Captcha instead of lockout to avoid this.