You'll find all kinds of fancy sprays and specialized formulas in a store for cleaning the burned-on gunk off your outdoor grill racks, but good old elbow grease and a stiff brush are all you really need. It'll help if you can tackle this project when the grill is still a little warm (though not hot!), but it will work regardless.
If you have stubborn charred remains on the racks, try treating those areas with a vinegar and baking soda mix. First apply baking soda and then dab with vinegar to get the foamy action started. Both vinegar and baking soda are safe to use around food, of course, but you'll still want to rinse your grill racks thoroughly before using them again.