Any food, eaten in excess, will make you gain weight, which includes foods made from soy. That doesn't mean that soy is inherently fattening, though; in fact, many soy-derived foods have nutrients that actually help with weight control. You can include soy in diets for weight gain or loss; the results you get depend on your individual needs and the total calories and quality of your diet. No single food will make you gain weight -- or lose it.
It all depends on how many calories you're eating each day as compared to how many you burn. Eat more than you burn, and you'll gain weight; eat less, and you'll lose. Your individual calorie needs depend on your size, activity level, gender and age, and you can use an online calculator to figure it out. Then add 250 to 500 calories to your daily goal for safe weight gain, or remove 500 to 1,000 calories for safe weight loss.