In the image shown above, you can see a typical knit newborn hat that you can expect your baby to wear as well, if you are planning on giving birth in a hospital (as well as those pink and blue striped blankets that are so typical!). Putting hats on newborns is definitely a convention followed in most countries around the world. But it is only necessary right after birth if the environment is cold. After your baby adjusts to life outside of the womb, hats are not necessary normally. It is perfectly normal to apply your common sense as a parent to decide when your baby needs a hat and when he or she is fine without a hat despite the beliefs of some cultures or generations that a baby must wear a hat at all times.
Babies obviously need a hat to keep them warm outside when it is winter and very cold. During hot summer days, babies obviously will not need a hat to keep them warm. But sunburn can be a serious problem, and sun hats keep summer babies' heads protected from the sun. Some babies love hats, and others hate them at start fussing when their parents put a hat on them at an early age, like several weeks old. As parents, it is up to us to find the right balance.