The way we breathe can certainly influence our posture and for some, mouth breathing can be the root cause of debilitating head and neck pain. If our airways are restricted, whether it's because of enlarged adenoids due to allergies, retruded/small jaws due to a low tongue posture because of a tongue tie, or a combination of these things, our head will tend to move forward in order to open up the back of our throat to allow more room for airflow.
This compensation often comes with a price. Because of the forward head movement, the rest of our body will alter it's position in order to keep us upright and not fall over. Muscles tend to become tired, sore and tender and can lead to headaches.
Have a look at this video as it explains the link between airways, jaw disorders, posture and head/neck pain. The position of the tongue isn't explained in the video however, but is vital in keeping the orofacial complex in a relaxed state. It needs to stay slightly suctioned to the roof of the mouth during rest with the tip of the tongue slightly back from the front upper teeth.