I have noticed when I look at Buddhists, or Buddhist monks, that they have shaved heads. Is there any significance to that? If so, then is it an obligation for Buddhists, or at least Buddhist monks to shave their heads?
First of all, lay Buddhists are not required to shave their heads, only the monks and nuns.
In most Buddhist traditions it is a custom/rule that when you become a monk or nun (a.k.a. Bhikkhu) you have to shave your head. There are also monastic rules that say that a Bhikkhu is not allowed to grow hair beyond a certain length or time.
The hair of the head should not be worn long. It should be shaved at least every two months or when the hair has grown to a length of two fingerbreadths — whichever occurs first, says the Commentary.
The beard should not be grown long, although — unlike the hair of the head — there is no explicit maximum length, unless the two month/two fingerbreadth rule is meant to apply here as well.
Several reasons have been given as to why these rules exist:
One of the first things Gautama Siddhartha (who became the Buddha) supposedly did when he left his palace and started looking for a way to defeat old age, sickness and death, was to shave off his hair and beard. Bhikkus show their commitment by doing the same.
Shaving our head symbolizes cutting off confusion, hostility, and attachment (source)
Shaving your hair removes the risk of vanity and allows you to focus on more important things than combing and fixing your hair every day.
By looking less attractive, celibacy (another monastic rule) becomes easier (at least that's what this author claims, I'm not sure about the validity of this myself).
I believe they shave their heads because they don't want to have attachments to the body or self image. They also don't use cosmetics, perfumes and so on... This is a very old practice, including the robes they wear, since the time of the Buddha
Lay people don't have to do it, only monks.
One reason with hair is you can use it for beautification like having a hair style. Monks are not allowed to use mirrors or look at once face unless it is for medical reasons or contemplating of aging and impermanence.
Long hair was the style many people had during Buddha's time some this prevents any styling and beautification.
It is an act of renunciation of the beauty or attractiveness of the human body or human appearance (Four Foundations of Mindfulness). Once a person sees and understands the suffering caused by societies obsession towards outer perfection (whatever that is) then shaving ones head is not a big deal!! The act of shaving ones head is very profound and liberating. It's a statement made by the individual. that they no longer wish to be part of such worldly ignorance!! Metta.
(I can't comment on this "...it is interesting to note that once you become enlightened you don't worry about such small things. Although Siddhartha cut his hair, Buddha kept long hair himself. – TheDarkKnightRules Nov 15 '14 at 9:48..." because of some silly rules of this website. But I would like to clear up a point that 'Buddha kept long hair himself.')
In vasala sutta (story heard) in the Tipitaka, a brahman said this to the Buddha "“tatreva, muṇḍaka; tatreva, samaṇaka; tatreva, vasalaka tiṭṭhāhī”ti. (Stop right there shaven-head, stop right there monk, stop...) The Pali word "muṇḍaka" means "a shaveling; shaven-headed".
There we have it. The Buddha had his head shaven too. No exception for Himself!
Another reason is the connection to the Divine. Hair stop energy moving, and in meditation practices they need to connect the Sahasrara as best as possible with the Divine, thus shaving the head allows for better "connection". There are also specific rituals and procedures for that part of the body that take place after death, but that's another story.
Great answer related to shaved heads, long hair, beards, etc: