"Pin money" is an English idiom referring to money set aside for trivial, fun purchases. This is similar to the American idiom "mad money".
The phrase is sexist in origin, referring to the allowance a husband gives his wife for her "luxury" expenses. I put luxury in quotes because many of these expenses were practical, not luxurious, in nature but were deemed a luxury because they were stereotypically feminine items, such as decorative pins which were used to fasten womens' clothing before the common use of buttons.
The phrase originated in the Middle Ages in England, when pins were handmade, scarce, and very expensive. Catherine Howard, the ill-fated, later beheaded, fifth wife of Henry VIII, is usually credited with popularizing French-made pins in England in the mid 1500s. To help prevent the hoarding of the limited number of pins by the upper class, a law was passed in England allowing pinmakers to sell their stock only on certain days of the year. This would allow women of all classes to save up enough "pin money" to have the opportunity of buying perhaps at least one pin when the scarce items were next made available.
When the industrial revolution introduced a glut of pins to the market, the prices dropped, and "pin money" became an expression referring to a wife's pocket money, regardless of intended use. Now the expression refers to any money earmarked for incidental expenses, regardless of the gender of the saver.
The first documented appearance of the phrase "pin money" in print is credited to Sir John Vanbrugh in 1697.
Your Money or Your Life by Joe Dominguez, Vicki Robin