Taken from a website A rain check was originally a voucher issued at baseball games that were rained out, allowing the spectators to return to watch another game
it is believed to come from old sporting games, when the stadium if the games was cancelled due to rain would give you a valid ticket or 'rain check' for a nother game.
The term is used in shopping also. Let's say Walmart is selling an item at $20 which usually costs $50. If they run out of the item they might give you a 'rain cheque' which means when they get more in you can purchase it at the sale price. A lot of sales will actually say: 'Sorry, no rain cheques'
Further to 4GS. My understanding is that it started with the Games in the Collesium at Rome before they could rig a cover. They were advertised as "weather permitting" so there may be something in it.