I've seen this formula used by Tom Tango:
The metric for hitting will be:
HR + SB + (H - .27*AB) + R/3 + RBI/3
The metric for pitching will be:
2*W + SV + K/5 + IP - (H + BB + ER)/2
It's pretty simple. .270 is slightly above league average BA so I'm assuming this is an estimate of average BA for fantasy leagues (not all players are used). So anything above .270 is going to be a positive contribution to the category. I suppose runs and RBI's are divided by 3 so that they don't impact multiple categories. Also SPs are weighted more heavily than RPs by the pitching metric.
I'm not sure if I can find the link. I just had the formula saved. It seems to align itself pretty well with the Yahoo rankings (though not perfectly).