If you plan to use a map with FeatureLayer, you can use the FeatureDataGrid. It already has sorting built-in. In this sample, you can update the FeatureLayer's Where property to define your query task.
http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#FeatureDataGrid
Otherwise, you can follow this sample as guide for performing query task and assigning results to a datagrid:
http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#QueryWithoutMap and this codeproject for sorting/grouping/filtering in datagrid:http://www.codeproject.com/Articles/83906/Silverlight-4-Datagrid-Sorting-Grouping-Filtering-.aspx