Generally speaking, you should go out of your way to avoid cursors, and try to use set-based standard SQL when you can.
One case where it is actually required is if you want to return multiple results in one query with PostgreSQL.
CREATE FUNCTION myfunc(refcursor, refcursor) RETURNS SETOF refcursor AS $$
BEGIN
OPEN $1 FOR SELECT * FROM table_1;
RETURN NEXT $1;
OPEN $2 FOR SELECT * FROM table_2;
RETURN NEXT $2;
END;
$$ LANGUAGE plpgsql;