well gaining a weight depends upon one's metabolism also..When you do gain weight you should aim at muscle gain, as excess fat would affect your health adversely. To gain muscle mass you must first train with weights with a knowledgeable trainer three to four times a week. Eat at least five to six small meals (take a good diet plan from a nutritionist/ dietician). If you are non-vegetarian, consuming a good quality protein is easy; in the way of milk, eggs, chicken and fish. If you are vegetarian, make sure you drink milk and combine cereals and pulses for good quality protein. But just an over-emphasis on protein won't help, see that your diet includes plenty of complex carbohydrates ie whole grains, cereals, pulses, fruits and vegetables.