I have seen some trees with a thick layer of moss growing on their branches, does this harm the tree? Should this layer of moss be removed or can it safely be left on the tree?
Moss will not harm the tree! Good news indeed because the forests around here would be in BIG trouble! Moss does not have true roots - their "roots" are just for the purpose anchoring themselves to things like trees, rocks and whatever really. The "roots" don't penetrate the tree or steal any nutrients or water from the tree. Leave the moss, and the lichens =]
Edit: It is possible that moss can cause bark rot and also be a holding ground for some fungi, bacteria and diseases. This is very dependent on the specie of tree and the specie of moss we are talking about. Tree bark comes in a range of thicknesses and rot resistance. I think it is rather extreme of stormy to instill such fear in moss on your tree though. 99.9% of the time, moss is not a problem for the tree. If you are looking for your answer, look at nature. Many of our oldest trees and old growth forests have an abundance of moss. There are many billions of trees that live to a ripe old age coexisting with moss. Moss thrives in the shade a dense forest or canopy provides. These trees make it to ripe old age, even with a solid coat of moss. Moss has always been around while trees evolved. If moss was such a threat to trees, they would have evolved a strategy to deal with them a long time ago. If moss was a real threat to trees, it would be considered a parasite because it is benefiting from the tree at its expense. Alas, I have never seen anything calling moss a parasite. The relationship between moss and trees dates back millions of years and it is a neutral relationship. Moss has its own purpose and function in the ecosystem. Plus it is beautiful.
So to reiterate my answer, no, moss is almost never a problem for trees. Don't worry about it.
If moss GIRDLES the tree YES it can. If moss is completely surrounding the tree and stays there long enough to hold moisture next to the bark, that will allow bacteria to begin decomposing the bark and compromising the vascular system just below. Somehow, in moist climates, moss on the north side only, seems to be just fine and I think the trees just thicken the bark or get used to using half the vascular system. Or get by until winter kills the moss long enough to allow the bark to dry.
This is more important on the trunk near the soil surface than higher up because there is more moisture available from the soil to keeps the moss alive.
Moss is of no health concern to trees. Spanish Moss (which isn't a moss) hangs from branches and its weight can be harmful, but actual moss is nothing to worry about.
Proper care is necessary to have healthy trees. Sometimes an abundance of moss or harmless lichens is an indication of poor air circulation. Check the proper pruning techniques for your tree. (This is seen a lot here in WI when people fail to perform necessary maintenance on their maples.). The tree isn't in danger, but without pruning, limbs will die and fall. This is normal for the tree, of course, but it's better to dictate falling limbs when you can.
The only detriment of moss and lichen on bark is it obscures your vision of the tree. This can, in rare cases, prevent an early diagnosis of a problem. However, as the moss' rhizoids provide a boost to the structural integrity of the bark, its more likely to prevent an issue than prevent an issue's diagnosis. Couple that with most issues that it could obscure being terminal (for the most part, if you've got something bubbling through the bark, the tree's a goner) and you're left with it being a question of aesthetics.
NOTE: If you see "moss" dangling from branches and not plastered on the bark, you're most likely looking at Spanish Moss (not a moss) that can snap branches when saturated due to its weight.