They should do HTML / CSS / JavaScript. Also, the JavaScript should align with the framework of the clients / product - Angular, React, not necessarily jQuery or Bootstrap. Whatever UX designers do, it should be shippable code.
Some of the designs which they think of without knowledge of HTML, CSS, and JavaScript may not be worthy of implementation. It might take too much of effort or can hit performance, especially load times of the page.
There is always no need but I'd go for learning at least the basics like css and html then.
Kleo Petrov
Professional human being for 29 years
It really depends on the company and project requirements. But let's first start with what an UX Designer is?
Wikipedia defines "User experience design" as
This involves things like wireframing and prototyping, user testing and managing scenarios. These are all design oriented processes that require little to no coding. After all the UX designer have to encompass all interactions between the potential customers and the company. The main responsibilities of the UX designer is to research, design, validate and test ideas as efficiently as possible.
As I stated in the beginning, different organizations have different needs. If you are working in a startup, your coding skills will be much more applicable and appreciated to working at a big/enterprise company.
So, instead of asking "Should UX designers learn to code?", we should form the question as "How much coding should UX Designers learn?"
In a best case scenario, an UX designer should learn enough HTML and CSS to form his ideas into a simple prototype and find particular hard and time consuming parts of the design. Having this knowledge will lead to better and more meaningful communication with the developers. Any additional help and clarification of a certain design decision will be much appreciated by every developer in a company.
Better Communication -> Happier team -> Greater Product!