the RGB image in snap is built using the red, green and blue bands of Sentinel-2 MSI: respectively bands 4, 3, 2 (as you can see on the snap shot, those bands are selected by default). the "Profiles" in this case are predefined colour composites to visualize the data (only 3 out of the 13 spectral bands of Sentinel-2 can be sen by the human eye at once).
You can create a similar geotif with gdal by creating a stack of those three bands, located in the /GRANULE/yourimagename/IMG_DATA directory
gdalbuildvrt -separate output.vrt image_B04.jp2 image_B03.jp2 image_B02.jp2
gdal_translate output.vrt output.tif -co TILED=YES -co COMPRESS=LZW -co BIGTIFF=YES
The advantage of using SNAP is that you do not need to unzip the file archive in order to open the image, and it is easier to select a subset and mosaic.
For color stretching, the fastest way in SNAP is to use the color manipulation. By default it uses the statistics of the image, but on my example below there was a lot of clouds, so the colour stretching had to be adjusted (except if you are interested in clouds...). Note that this is on the fly manipulation, so the pixel values are not modified. You could also do this with command lines, but is is difficult to automate on raw data that have not been atmospherically corrected and cloud screened (cloud, cloud shadow, large water area... can strongly affect the statistics).