The file is downloaded from worldclom2.1 containing the tagged data about temperature, elevation and precipitation, wind and water vapor with resolution of 30s
Do you want the coordinates to be included in the csv or not? Which of those tagged data you need? Note that for big rasters, csv is not a good storage method.
Nevertheless, as Nikolaos Tziokas pointed out, this is not a very efficient format to store rasters, and if the rasters you are handling are very large it could be very impractical.
Go Raster->Conversion->Translate and then set the output to ASCII XYZ from the drop-down menu when you specify the output file.
An alternative ASCII format you may care to consider is the ESRI ASC format, which is smaller because it only lists the height (Z) and has a header which sets the raster origin and resolution. The X and Y fields are now superfluous, as a raster is a regular grid.
ASCII is a poor way of storing rasters though and you'd be better off with a GeoTif or JPEG.
Working around a 'gotcha' in the QGIS translate dialog: The Translate tool in QGIS has a major 'gotcha'. It doesn't automatically change the output format in the command line parameters, so changing the type in the output file doesn't automatically do anything other than change the extension of the output file name. The actual output encoding remains as the default GTiff. So, you must manually edit the command line parameters. To do this, set up the translation as normal and then click the little yellow pencil at the bottom of the dialog box (1). Then edit the command line so that the -of parameter reads XYZ (in this case) instead of GTiff (2).
When it comes to raster data visualisation or analysis, ArcGIS is much better than QGIS. Yet, there are also a number of ways to get raster values to CSV or Excel file systems. One way is the above method recommended by Mehdi; the other is with geoprocessing tools in QGIS. This works when you want to know the raster value of a specific x,y point or polygon. To do that, activate geoprocessing tools > raster analysis >> extract raster values; or in geoprocessing tools, go to SAGA >>add ratser values to points/polygons/features. after extracting the values, you can save them as a CSV file.
first search gdal2xyz at the search box in QGIS then select gdal2xyz. then open gdal2xyz, select the input layer, check the output comma-separated value box, set the output folder then press run.
Rasters are continuous in nature so storing the data in CSV while preserving the data would be next to impossible. In arcGIS you may generate fishnets with points located at a predetermined distance and use "Get Raster Values to Points" tool.