You can define the output type as json|csv|column
-format ‘json|csv|column’
Format specifies the format of the server responses: json, csv, or column.
So your command will become
curl -G ‘http://my.server.com:8086/query?db=mydb’ --data-urlencode “q=select * from sensor where time > now() - 2d” -format csv> output_file