(1) “They want us to return the widgets, which don’t work.”
(2) “They want us to return the widgets which don’t work.”
If none of the widgets work properly, (1) makes the point. If some of them work and some of them don’t, and we only want to return the non-working widgets, (2) does the job. A comma before a relative clause tells the reader that it is describing the preceding noun (“widgets”); omit the comma and the noun and clause fuse into one idea, where the clause is true of all the things conveyed by the noun.