You can have a genetic predisposition to being overweight or underweight. When there is an excess of calories some people store more fat than others, and when there is a deficit of calories some people burn more fat than others. Genetics can also affect the distribution of fat on your body.
However, whatever your genetic predisposition, you can still make a difference. It is the quality and quantity of the foods you eat, and how you exercise, that play the greatest role in determining your appearance, weight, and risk of weight-related disease.
It is interesting to note that rates of obesity have been increasing much faster than they possibly could through genetics alone. This makes it clear that our eating and exercise habits have played the greater role.
While there is not yet a test you can take, you may learn something from looking at your family. But if your elders are overweight, you should be as concerned with the eating habits they have passed on to you as you are with their genes. Obese parents are more likely to have obese children and obese pets, and you can't blame the latter on genes.
If you are overweight and suspect that genetics may be a factor, you have a choice. You can accept it as your destiny and do nothing, or you can consider that you have that much greater reason to learn to eat well and exercise. You may not be able to achieve supermodel status, but you can look really, really good.