A house can be 'on fire' or 'in flames'. They can be used interchangeably, but there seems to be a difference of involvement - 'in flames' suggests the house is engulfed by fire, 'on fire' could mean that only part of the house is burning. Maybe the rule is that 'in' indicates a stronger involvement then 'on'. 'On' has a sense of separateness - when a house is 'on fire' you can see the house and the fire as two things. You can put the fire out and the house could remain. 'In flames' suggests that even if you put the fire out, what's left is a very different structure.
Someone 'on parole' is not defined by parole. They have a life and parole is just a part of that. When you're 'in prison', you're not just physically contained, your life is defined by prison.
'I bought a shirt on sale' versus 'I bought a shirt in a sale' stumps me. They seem different but can't quite put my finger on it. The first emphasises the shirt, the second also brings to mind the context of where I bought the shirt.
Is 'on' used when the way you got the shirt is not as important as the shirt itself? And 'in' when the context of buying the shirt is relevant? 'In a sale' brings to mind the jostling and competition between customers looking for cheap shirts.