On the money or right on the money as it also often expressed, is among several idioms about exactitude (preciseness / accurateness). Most sources agree it has to do with horse racing, specifically the related bets. A winning horse would be on the money. A losing one would be out of the money.
In short, this means something which is exactly correct – be it a place, an idea, or an amount
Example
I won the contest because my guess was on the money
I think her assessment of the situation is right on the money