There is not much of a systematic relationship. The fit line bumps and wiggles but is essentially flat. The bivariate correlation is 0.19, with a p-value of 0.21. Based on these measures, states with larger unionized workforces do not have larger budget deficits.
The data are quite clear, but I think they are nonetheless a bit misleading. I don't think the claim of Gov. Walker in Wisconsin and other opponents of public sector unionization is that unions create deficits directly. Instead, I think, the claim is that the political influence of public sector unions combined with the collective bargaining process increase spending (which increases deficits when revenue collections fall due to reductions in tax rates or a shrinking economy). When public sector unions participate in the political process, candidates who are supported by unions can become officeholders charged with negotiating collective agreements for public sector unions. The unions, then, have agents on both sides of the bargaining table when their salaries and benefits are negotiated. This obviously creates a situation in which any given bargaining session may yield compensation for union members that is greater than that which would have been negotiated under adversarial circumstances. Terry Moe makes the point more thoroughly here.
So, the correlation we would expect is between public sector union membership (particularly membership subject to collective bargaining agreements) and public expenditures. And, in fact, that is what we may observe. Using data on public sector unionization for 2010 from unionstats.com and state spending for 2011 from the CBPP, I constructed the following scatterplot:
Let me note a couple things that are problematic about my analysis.
First, I am missing budget data from eights states: WY, TN, ND, NH, DE, AR, AK, and AL. (I computed total state spending for 2011 from Table 1 on the indicated CBPP webpage, so I had to live with their missing data. I couldn't find an alternative source within my self-imposed blogging time limit.) With the exception of AK, which has high unionization, most of these states are probably in the low spending low unionization quadrant, so I wouldn't expect the correlation or fit line to change much, but it could.
Second, budgeting is a complex political process with very strong autoregressive (perhaps even integrated) components. So, budgets in any given year reflect many prior years of budget decision-making. Unionization rates in one year tell us only a very small part of the story about the formulation of a budget in that year. So, it would be very easy to over-read the figure I've produced or put too much stock in the slope of that regression line.
Having said all that, I think the Walker-Moe point of view has more merit than most of its opponents suggest. Public sector unionization may very well create political dynamics that push public expenditures above levels they would have reached otherwise. Limiting the scope of public sector unions' collective bargaining rights may be a useful structural reform for limiting the growth of government spending over time.