This question asks the question for baking. For for regular stove-top cooking, will it work. Other than minor adjustments for cooking time.
EDIT 3/22/11: the specific items I am making are white sauce for pasta, mashed potatoes, for example
You can almost always substitute soy milk for regular 2% milk in baking. Soy has almost as much protein as regular milk and slightly less fat that 2% milk.
You'll probably not notice any difference. I've used it in baking and had good results.
Here's the breakdown (according to the Silk Brand Vanilla Soy Milk from my Fridge):
Soy Milk Stats (per cup): Protein: 6g, Total fat: 3.5g, Total Carbs: 11g
2% Milk Stats (per cup): Protein: 8g, Total fat: 5g, Carbs: 12g
I've not usually had a problem substituting soy milk for regular milk in cooking. Just make sure you use the plain kind and not the vanilla flavored kind, which seems to be rather common.
The only things I would add, are that soy milk tends to separate more readily with heat, particularly in the presence of certain additives. Sometimes in savoury sauces oat milk works better as it does not separate.
Also, a lot of the fresh soya milk products (at least in the UK) are sweetened and flavoured slightly, usually with vanilla. Use an unsweetened and non-vanilla variety in savoury cooking.