I'm starting with BW because I know it better (and it's easier).
The first thing to do is to compare minerals and vespene. The standard main+natural (and by standard I mean Empire of the Sun is the only one that differs) has a 12:5 ratio of minerals to gas; I will use this as my standard conversion factor. Taking an average of six maps in recent use (Aztec, Benzene, Circuit Breakers, Empire of the Sun, Fighting Spirit, Fortress) the entire map has a ratio above 13:5. For ease of use we can lay out a standard resource unit (SRU) = 25 minerals OR 10 gas.
SCV = 50 min, 0 gas = 2 SRU
Marine = 50 min, 0 gas = 2 SRU
Vulture = 75 min, 0 gas = 3 SRU
Firebat = 50 min, 25 gas = 4.5 SRU
Medic = 50 min, 25 gas = 4.5 SRU
Ghost = 25 min, 75 gas = 8.5 SRU
Goliath = 100 min, 50 gas = 9 SRU
Dropship = 100 min, 100 gas = 14 SRU
Tank = 150 min, 100 gas = 16 SRU
Wraith = 150 min, 100 gas = 16 SRU
Valkyrie = 250 min, 125 gas = 22.5 SRU
Science Vessel = 100 min, 225 gas = 26.5 SRU
Battlecruiser = 400 min, 300 gas = 46 SRU
The remaining question is how to deal with supply. I think we can just use the SRUs paid for the supply the unit uses; 4 SRU = 8 supply; 1 supply costs 0.5 SRU So we can finish up the chart for Terran and do Protoss and Zerg too:
+ Show Spoiler [Protoss] +
Probe = 50, 0, 1 = 2.5 SRU
Zealot = 100, 0, 2 = 5 SRU
Observer = 25, 75, 1 = 9 SRU
Shuttle = 200, 0, 2 = 9 SRU
Dragoon = 125, 50, 2 = 11 SRU
Dark Templar = 125, 100, 2 = 16 SRU
Corsair = 150, 100, 2 = 17 SRU
High Templar = 50, 150, 2 = 18 SRU
Reaver = 200, 100, 4 = 20 SRU
Scarab = 15, 0, 0 = 0.6 SRU
Scout = 275, 125, 3 = 25 SRU
Dark Archon = 250, 200, 4 = 32 SRU
Archon = 100, 300, 4 = 36 SRU
Arbiter = 100, 350, 4 = 41 SRU
Carrier (8) = 550, 250, 6 = 50 SRU
Zealot = 100, 0, 2 = 5 SRU
Observer = 25, 75, 1 = 9 SRU
Shuttle = 200, 0, 2 = 9 SRU
Dragoon = 125, 50, 2 = 11 SRU
Dark Templar = 125, 100, 2 = 16 SRU
Corsair = 150, 100, 2 = 17 SRU
High Templar = 50, 150, 2 = 18 SRU
Reaver = 200, 100, 4 = 20 SRU
Scarab = 15, 0, 0 = 0.6 SRU
Scout = 275, 125, 3 = 25 SRU
Dark Archon = 250, 200, 4 = 32 SRU
Archon = 100, 300, 4 = 36 SRU
Arbiter = 100, 350, 4 = 41 SRU
Carrier (8) = 550, 250, 6 = 50 SRU
+ Show Spoiler [Terran] +
SCV = 50, 0, 1 = 2.5 SRU
Marine = 50, 0, 1 = 2.5 SRU
Vulture = 75, 0, 3 = 4 SRU
Firebat = 50, 25, 1 = 5 SRU
Medic = 50, 25, 1 = 5 SRU
Ghost = 25, 75, 1 = 9 SRU
Goliath = 100, 50, 2 = 10 SRU
Dropship = 100, 100, 2 = 15 SRU
Tank = 150, 100, 2 = 17 SRU
Wraith = 150, 100, 2 = 17 SRU
Valkyrie = 250, 125, 3 = 24 SRU
Science Vessel = 100, 225, 2 = 27.5 SRU
Battlecruiser = 400, 300, 6 = 49 SRU
Marine = 50, 0, 1 = 2.5 SRU
Vulture = 75, 0, 3 = 4 SRU
Firebat = 50, 25, 1 = 5 SRU
Medic = 50, 25, 1 = 5 SRU
Ghost = 25, 75, 1 = 9 SRU
Goliath = 100, 50, 2 = 10 SRU
Dropship = 100, 100, 2 = 15 SRU
Tank = 150, 100, 2 = 17 SRU
Wraith = 150, 100, 2 = 17 SRU
Valkyrie = 250, 125, 3 = 24 SRU
Science Vessel = 100, 225, 2 = 27.5 SRU
Battlecruiser = 400, 300, 6 = 49 SRU
+ Show Spoiler [Zerg] +
Overlord = 100, 0, -8 = 0 SRU
Zergling (2) = 50, 0, 1 = 2.5 SRU
Drone = 50, 0, 1 = 2.5 SRU
Hydralisk = 75, 25, 1 = 6.5 SRU
Scourge (2) = 25, 75, 1 = 9 SRU
Infested Terran = 100, 50, 1 = 9.5 SRU
Mutalisk = 100, 100, 2 = 15 SRU
Queen = 100, 100, 2 = 15 SRU
Defiler = 50, 150, 2 = 18 SRU
Devourer = 250, 150, 2 = 26 SRU
Guardian = 150, 200, 2 = 27 SRU
Lurker = 200, 200, 2 = 29 SRU
Ultralisk = 200, 200, 4 = 30 SRU
Zergling (2) = 50, 0, 1 = 2.5 SRU
Drone = 50, 0, 1 = 2.5 SRU
Hydralisk = 75, 25, 1 = 6.5 SRU
Scourge (2) = 25, 75, 1 = 9 SRU
Infested Terran = 100, 50, 1 = 9.5 SRU
Mutalisk = 100, 100, 2 = 15 SRU
Queen = 100, 100, 2 = 15 SRU
Defiler = 50, 150, 2 = 18 SRU
Devourer = 250, 150, 2 = 26 SRU
Guardian = 150, 200, 2 = 27 SRU
Lurker = 200, 200, 2 = 29 SRU
Ultralisk = 200, 200, 4 = 30 SRU
+ Show Spoiler [All Units by SRU] +
Overlord - 0 SRU
Drone - 2.5 SRU
Probe - 2.5 SRU
SCV - 2.5 SRU
Marine - 2.5 SRU
Zergling (2) - 2.5 SRU
Vulture - 4 SRU
Firebat - 5 SRU
Medic - 5 SRU
Zealot - 5 SRU
Hydralisk - 6.5 SRU
Ghost - 9 SRU
Observer - 9 SRU
Scourge - 9 SRU
Shuttle - 9 SRU
Infested Terran - 9.5 SRU
Goliath - 10 SRU
Dragoon - 11 SRU
Dropship - 15 SRU
Mutalisk - 15 SRU
Queen - 15 SRU
Dark Templar - 16 SRU
Corsair - 17 SRU
Tank - 17 SRU
Wraith - 17 SRU
Defiler - 18 SRU
High Templar - 18 SRU
Reaver - 20 SRU
Scarab - 0.6 SRU
Valkyrie - 24 SRU
Scout - 25 SRU
Devourer - 26 SRU
Guardian - 27 SRU
Science Vessel - 27.5 SRU
Lurker - 29 SRU
Ultralisk - 30 SRU
Dark Archon - 32 SRU
Archon - 36 SRU
Arbiter - 41 SRU
Battlecruiser - 49 SRU
Carrier (8) - 50 SRU
Drone - 2.5 SRU
Probe - 2.5 SRU
SCV - 2.5 SRU
Marine - 2.5 SRU
Zergling (2) - 2.5 SRU
Vulture - 4 SRU
Firebat - 5 SRU
Medic - 5 SRU
Zealot - 5 SRU
Hydralisk - 6.5 SRU
Ghost - 9 SRU
Observer - 9 SRU
Scourge - 9 SRU
Shuttle - 9 SRU
Infested Terran - 9.5 SRU
Goliath - 10 SRU
Dragoon - 11 SRU
Dropship - 15 SRU
Mutalisk - 15 SRU
Queen - 15 SRU
Dark Templar - 16 SRU
Corsair - 17 SRU
Tank - 17 SRU
Wraith - 17 SRU
Defiler - 18 SRU
High Templar - 18 SRU
Reaver - 20 SRU
Scarab - 0.6 SRU
Valkyrie - 24 SRU
Scout - 25 SRU
Devourer - 26 SRU
Guardian - 27 SRU
Science Vessel - 27.5 SRU
Lurker - 29 SRU
Ultralisk - 30 SRU
Dark Archon - 32 SRU
Archon - 36 SRU
Arbiter - 41 SRU
Battlecruiser - 49 SRU
Carrier (8) - 50 SRU
This could be improved: the biggest missing point is some adjustment for build time; the next biggest is some account of tech tree. For now I feel that this offers a pretty solid estimate of the cost of each unit. Along with the other work I've done, my biggest take-away so far is, "Holy Batman lurkers are expensive."
Thought: I'm not sure if this is actually possible to do for SC2 yet as I'm unaware whether there's a "standard base" like BW has developed (that makes the min-gas comparison possible). SC2 player help?
This is only an cost index. Upcoming: I take this and run it against unit stats to develop the actual efficiency metric and index.