The quick, not particularly useful answer is: As much as you want to give them.
I believe the last time I had this situation I was doing about 5gp per person per year in taxes, and then intermittent payments in mithril, amythest and cash from the mines.
You should at least make it so that the players will see a decent return on the cash they put into the town. That way they will continue to add to it, and not their pool of magic items.
What I am hoping to figure out is a simple formula that will reflect just what you are saying.
For instance, Town Population * X gp / # of characters = yearly gross income.
How much would your average person pay in taxes each year?
As for the mining operation, it is fairly successful, but I don't want it to be so successful it flood their coffers with unlimited amount of gold.
They are level 10 at the moment, so maybe 20,000 gp a year profit? The mines are actually a giant meteor, so after X years, it will run dry.
Also, does anyone know what your average innkeeper, blacksmith, or <insert common medieval industry> would make per year? Or even how much it would cost to make a tavern, an inn, a manor house, etc. We have been using the old AD&D Castle Guide for costs of things such as the town wall, which they are just now starting to pay for. The settlement is small, so I have figured a progression on how the town will grow in size from new workers coming to the wealth that is being distributed, but I also want the characters to make money so, like you said, they could reinvest in the town. I want the characters to be a vital addition to the town. As the monetary funders of the wall, they will institute the first taxes, levying them for the protection they are offering. I just want this to be as 'realistic' as possible. Something I can scale as the town grows.