How do I know ifs hat to dress my newborn in when going outside?

Depends. Newborns have a greater portion of their body mass & surface in their head than older kids & can loose a greater amount of body heat from exposed surfaces. If it is cold outside it is reasonable to cover the head. If it is hot, it is important not to cover up so the baby can perspire & self regulate their temperature. If u feel a wetness behind the neck, baby is getting a bit too hot.
WINDY. Conditions should deserve a hat covering his ears and of course cold temperatures.