How can you know when your headaches are from eye-strain?

May be difficult. If headaches get progressively worse with extended use of the eyes are disappear completely when relaxed then they are likely caused by vision. Headaches have many different causes so it takes a systematic approach to identification and treatment. Making sure the vision is corrected adequately is just one aspect of headache evaluation.
Ophthalmology consul. Get your eyes checked preferably by an ophthalmologist.