According to your Height 170 cms,Weight 54 kg. your BMI would be 18.7,which means you are in the underweight zone.To improve your weight have a good nutritious diet and exercise
Diet. : Less carbohydrates, more protein,less fats, high fibre.
Lots of veg salads & fruits in between meals
Avoid fatty & junk foods.
Eat in time i.e eat in small amounts at regular intervals.
Have a good breakfast.Never skip meals.
Have a glass of toned milk and 2 egg whites daily.
Exercise. : Brisk walk for half an hour or cycling,or playing tennis or swimming
Have a healthy living.
according to your height and weight your bmi is 18.68 which is in lower border but not abnormal,
you can improve it by DIET and EXERCISE.
if you still think its abnormal weight loss or no gain in weight even after enough diet you need to get checked