Do I need to create index for the column when using it in update statement?
Indexes are meant to improve performance of predicates used in WHERE, JOIN, and HAVING clauses for any type of query. So yes having an index on userId theoretically can improve performance of your UPDATE example query.
After you create the index you don't need to specify it in your query, PostgreSQL will automatically use it if its engine thinks it'll help the query performance.