As far as I can tell - your lap time goes blue if it is the best lap for the race/session. You may have more than one blue time if you continue to improve - the blue lap you beat does not revert to white after it is beaten.
That's what I thought until I saw that the lap before the one I just did was faster, and both were blue.. I'll see if I can get it again and post a picture
I think when your trying to do a time trail, a blue time will come up at the end of a sector to show that you are ahead at that particular point than the competition. If you are behind, it will be red.