Different factors can influence the budgets of different cities. Big cities have different commitments than small cities. Some cities levy income taxes, others do not. Therefore, this answer is very generic and will not apply to all cities.
For all cities, budgets depend on the balance between revenues and money that has to be spent. One factor, then, is the amount of revenue that comes in. This typically depends on the economic health of the city. For example, many cities rely on sales taxes and property taxes for the bulk of their revenues. When the economy is good, people buy more things in the city, thus generating more sales tax revenue. When a city is growing, properties within its boundaries gain value and property tax revenue increases. Thus, the economic climate is one major factor that determines how much revenue a city takes in.
Cities have different demands on their budgets. Some cities, particularly larger ones, will have some programs that are essentially welfare programs. These may need more money devoted to them when times are hard. Cities also have to spend on things like their police forces. Increases in crime, then, can put more stress on a city’s budget. There are many factors, then, that can affect how much a city has to spend.