I get a lot of headaches could this be anything to do with smoking weed?

Sure. Headache is a very common and non-specific symptom, and it can certainly occur after smoking anything. It could be due to a minor lack of oxygen, eye irritation from the smoke, direct effect of thc, lots of things. All drugs, legal and otherwise, can have side-effects. If you get headaches, consider curtailing your use.