Rescued from the Nostalrius forums, with 2 caveats: 1.) This is based on the warlock dps sheet done by Particles and Cousy. 2.) I'm not a boomkin and think it's a silly spec, but if you're going to do it, you should at least know how to gear for it.
The following is the formula for calculating your dps in a raid, and you can use that formula to calculate how much a gear upgrade will increase your dps. Druid is considerably easier to do, since we don't have stupid things like Arcane Power, Improved Shadowbolt, and Ignite to worry about.
Thanks mainly to our warlock overlords (all hail the burning legion), here's your overall dps calculation for spamming starfire in a raid (assuming you have nature's grace, and miss is 17-your hit%):
(StarfireBase+spellpower)(1+crit/100)(1-miss/100)/(3-0.5*crit/100)
Now, there's three variables that can affect your dps here: spellpower, crit, and hit. However, they're all related to each other so it isn't a linear relationship.
The derivative of spellpower (x) to your damage is: (1+crit/100)*(1-miss/100)/(3-0.5*crit/100)
The derivative of crit (y) to your damage is: (StarfireBase+spellpower)(1/100)(1-miss/100)/(3-0.5*crit/100)
The derivative of hit (z) to your damage is: (StarfireBase+spellpower)(1+crit/100)(1/100)/(3-0.5*crit/100)
Therefore:
1 crit = y/x spellpower
1 hit = z/x spellpower
(StarfireBase+spellpower) Starfire is a 3.5 second base cast, so there is no spellpower coefficient. Your damage is just the base damage of Starfire (this will change when you get the AQ20 book) + your total spellpower bonus.
(1+crit/100) If you have 20% crit, your damage will be increased by 20%, assuming you have 5/5 vengeance.
(1-miss/100) If you have 10% miss, that will be a straight 10% loss to your dps.
(3-0.5*crit/100) This calculation is for dps. Starfire has a (talented) 3 second cast, and your crit % of the time it will be 0.5 seconds faster with nature's grace.
Now, what we're really interested in is applying this to gear choices, so it's important to identify how each stat contributes to dps. Not that each contribution depends on the other two variables. This is why you need to use derivatives instead of just algebra.
(1+crit/100)*(1-miss/100)/(3-0.5*crit/100) This is what modifies the contribution of spellpower to damage. (dps/sp)
{(StarfireBase+spellpower)(1/100)(1-miss/100)/(3-0.5*crit/100)}+{(0.5/100)(StarfireBase + spellpower)(1 + crit/100)(1-miss/100)/(3 - 0.5*crit/100)^2} This is what modifies the contribution of crit to damage. (dps/crit)
(StarfireBase+spellpower)(1+crit/100)(1/100)/(3-0.5*crit/100) This is what modifies the contribution of hit to damage. (dps/hit)
Using the first derivative above, you should find that 1 spellpower will increase your dps by x (something around 0.35-0.42ish, depending on your gear). To find how much spellpower 1 crit equals, just divide dps/crit by dps/sp. The terms cancel out and you get sp/crit. You can calculate sp/hit in the same way.
So, if you wanted to make a spreadsheet of gear upgrades, you would want to first list how much hit (listed on the item), spellpower (listed on the item), and crit (listed on the item + int/60) on each piece of your gear, then add them together to get your total stat values. Then determine the dps increase from each of those 3 stats (using the respective derivative above), and add them together for the total damage provided by a specific piece of gear (dps/sp + dps/crit + dps/hit). Then you can swap in alternate gear to determine the dps increase by it.
It's worth pointing out that this is just for maximizing your potential dps, with no regard to silly things like mana regen. There's no way to reliably model that, so I would suggest gearing for maximum dps and then swapping regen items if you're finding yourself perma-oom before the end of a fight.
TL;DR: Your dps is affected by your spellpower, crit %, and hit %. The relative value of each stat changes depending on your gear, and you can use the above formulas to determine which upgrades are best for you.