Basically, it is affected by two sets of things: wealth producers, and wealth consumers.
Planetary populations are your greatest source of wealth (assuming you aren't playing with a version where moneyships are possible). You also generate wealth from the activities of civilian vessels (taxes on cargo pickup, dropoff, and carrying cargo-each is a seperate, taxable activity), from civilian mining colonies, from financial centers, and from scrapping operations.
Your wealth is "used" for pretty much everything you do: installation operation, shipbuilding, shipyard expansion, supporting ground troops and ships, etc.
It can be difficult to balance wealth without cheating with moneyships, so your best bet for staying in the black is to cycle operations. In other words, don't be building factories, missiles, ships, ground troops, and fighters, while also expanding your shipyards and conducting research. Stick to two-three activities at a time, and you'll usually be able to balance things out. The Expand Civilian Economy research projects give a big boost, but have increasingly absurd RP requirements. IIRC, the later ones can get into hundreds of millions of RP required to complete. One or two is usually enough. I tend to avoid financial centers because they drain population away from important workforces for little return.
The best non-cheating way to have plenty of wealth is to do a conventional start with a high population (1-2 billion), as you will be building up massive amounts of population and wealth for decades while you slowly build up your T/N industry. Typically when I do this, I have in the neighborhood of 600,000-750,000 racial wealth by the time I start going negative on my income.
Becuase finacial centers are relativly cheap mineral wise, I'll occasionally dump several thousand minerals on an otherwise barren col cost 0 world along with the temporary loan of a dozen factories, and let them build financial sectors to their hearts content. Each financial center produces 100 times the wealth that the worker population would otherwise generate. So on a populous planet financial centers will increase your wealth by about ~25x if you include service sector and agriculture/environmental workers.
That ignores the point I made: using financial centers takes population directly away from your manufacturing sector workforce, meaning that if you have an efficient pattern of growth and development (you are expanding industry, shipyard capacity, research labs, etc. at such a rate that population growth barely keeps everything fully staffed), building more than a handful of them will seriously reduce the efficiency of your entire planet. Financial centers (IIRC) do NOT increase the base wealth output per capita, as you appear to be suggesting (this is what the Civilian Economy techs do), but rather provide additional income. So yes, they are feasible for increasing wealth output on worlds which are useless for everything other than building a taxable population, but that pretty clearly doesn't apply to the situation at hand (making sure you have a decent output of wealth in the early stages of the game, so you don't end up deep in the red later). Making pure pop/wealth colony worlds isn't something you'll even be thinking about until (depending on the exact details of your start) anywhere from 15 to 50 years into your game, much less putting it into practice.
Not entirely true. There are a few caveats to this - if you're doing a conventional start game AND Mars is lacking in Trans-Newtonian minerals, it does make sense to use Mars as a money/population generator, as it helps get your civilian economy up and running to have a colony in-system with Earth, and Mars is easiest to terraform for that purpose.
By a Trans-Newtonian start game, I agree that if Mars is a no go, it's probably easier to explore and found an out-system colony if you strike a mother-lode nearby.