The differences in a harder or softer tire compound include not only the maximum amount of grip available, and a theoretical maximum distance on each set that was identified by both you and Wonea, but most importantly compound affects how quickly the tire will heat up.
The speed in which the tire heats along with the track temperatures will make most of the decision regarding which tire compound to use. Typically for higher temperature tracks, if one chooses a soft compound tire, it will start to overheat too soon causing a reduction in traction and an increase in the number of pit stops required. In the opposite case, a hard compound tire on a cold track will have trouble reaching its optimal operating temperature range reducing the maximum grip available. As a general rule the driver's, or his crew's, goal is to use the softest compound the track conditions, the drivers driving style, and the length of the race will permit.
It will take some experimentation with varying track temperatures to see which compounds work best for you. As a good starting point, since you are playing GT5 and not killing your actual tires(man have I blown money on those), on the same track, with same temperatures, using each compound, monitor your tire temperature after 1-10 laps. Try to make some qualitative notes on handling characteristics, and if you can, speeds at corners. After that, try a different track temperature. Notice which tires are in the good operating temperature zones and on which laps.
After some experimentation, here is a site where we discuss tire dynamics at track events. Happy Racing!