I am thinking about buying a christmas tree but I want to know if that is or isn't good from a sustainability viewpoint.
Perhaps the best answer to the question, as posed, is...
Research the source of the tree. Was it farmed under the guidelines or certification of the American Tree Farm System or in Britain the British Christmas Tree Growers Association (BCTGA) or the Forest Stewardship Council (FSC)?
There definitely are eco-friendly tree growers using low-grade land that is not suitable for food crops, however is perfectly suitable for growing trees.
Also, try to buy a living, root-balled tree as opposed to one that was cut down. After the holidays, plant it in a slightly larger pot, move outside, and use it again next year.
If you don't buy a Christmas tree your impact on the environment is 0.
If you do buy a tree, there will be some impact because most likely water, fertilizer and pesticides were used to grow the tree, the tree has to be dug out or cut down, and it has to be transported. Where I live some people like to gather and burn Christmas trees on new year's eve which causes air pollution. Of course you can opt to buy a root-balled tree with roots intact and replant it after Christmas to minimize your impact.
So in short, if you want to keep your environmental impact as low as possible then don't buy a tree, but the total impact of buying a tree is small, especially if you buy an organic one and replant. You can do much more good (or less harm) to the environment if you focus on minimizing your impact caused by daily commutes, your diet and your home's energy usage (see also this question for example)
BTW this year we 'adopted' an organic Christmas tree via this Dutch organisation (website in Dutch, no affiliation, just a happy customer). In the first week of January the tree is taken back to the grower where it is replanted. If it survives we can reuse the same tree next year.
My simple answer is yes, especially if you have two planted in it's place. That's assuming you mean to buy a Christmas tree that's been cut down. (Unless you plan on removing the tree from the earth's ecosystem, or it is the 'last' tree, than it's all a part of the circle of life.)