How to extract lat-lon from MOD10C2 hdf data in matlab?
The latitude and longitude of each pixel is not stored in the HDF file. But using

metadata=hdfinfo('file_name.hdf');

You can get the info to generate those latitudes and longitudes. In metadata.Attibutes you will find this among other things:

    GridName="MOD_CMG_Snow_5km"
    XDim=7200
    YDim=3600
    UpperLeftPointMtrs=(-180000000.000000,90000000.000000)
    LowerRightMtrs=(180000000.000000,-90000000.000000)
    Projection=GCTP_GEO


If you rather a more human-readable format, check the product specifications for MOD10C2.

There it say:


  Projection
  
  MODIS CMG data sets are produced in a Geographic Lat/Lon
  projection. This simple projection treats geographical longitude and
  latitude degrees as if they were x- and y-coordinates in a plane.
  Figure 1 shows the geographical lat/lon projection known as Plate
  Carrée, which plots longitude and latitude degrees as coordinates on
  the x and y axes, respectively:
  
  
  
  Figure 1: Plate Carrée projection.
  
  Grid
  
  The MODIS CMG consists of 7200 columns by 3600 rows. Each cell
  has a resolution of 0.05 degrees (approximately 5 km). The upper-left
  corner of the upper-left cell is -180.00 degrees longitude, 90.00
  degrees latitude. The lower-right corner of the lower right cell is
  -180.00 degrees longitude, -90.00 degrees latitude...


With that you have more than enough information to generate the latitude and longitude vectors. Now you have to decide if you will store the center of each pixel, or one of the corners.

Assuming you will store the center of each pixel you can generate the latitude and longitude vectors like this:

gridSize=0.05 % arc degrees
lat=-90+(gridSize/2):0.05:90-(gridSize/2);
lon=-180+(gridSize/2):0.05:180-(gridSize/2);


And if you want instead matrices with the coordinates of the center of each individual pixel, you do


  [lonGrid,latGrid]=meshgrid(lon,lat);