First, you are designing the user experience (UE), not just a UI. You want to know your audience; expert, in-house, public, or a combination. For the public, you want to understand your target audience; perhaps some demographics like age and education. What is the goal of the site/app?
Second, designing a UI does not happen in a vacuum. It needs to interface not only with front end aspects like OS, browser, etc. but also with potential items like databases, external inputs(location, movement, etc) You need to be aware of those parameters so as to avoid creating a disaster for the team behind you. You are a member of a team!
Third, you need to understand what can be (reasonably) done within the architecture you are using. This is very much a balance issue, i.e. is it worth the development time vs the return or would something simpler fit the bill just as well.
Fourth, you need to interface with the client/ end users. You are both a translator and a communicator between the user and the programmers. To the third item above, the client may give you a list of things but they may not be willing to invest the money or potential launch delay to implement one or more of those items.
Unfortunately, I see more poorly thought out UI’s today than previously. For example, I critiqued a website recently that had fantastic programming with all the latest widgets. Very modern and geared toward twenty-somethings. The problem is their target audience was 45–65; a group that probably closed the tab within 15 seconds. Or seeing an expert POS system where the employee had about 50 mouse clicks to complete one screen. Had it been keyboard-driven, it would have taken about 1/3 the time.
Those were two bad user experiences where the architect just forgot the mission and didn’t consider the target and goal. Or maybe failed to ride herd on the team. Riding herd is a good skill; it isn’t so much that every member of the herd has to be in an exact position, but the herd needs to keep moving in the right direction and keep those strays closer.