Like meagstudies explained, it’s all down to implication based on the situation. In the first case, imagine two scenarios:
A student got his report card back from school and it’s all F’s. If he says, 毎日勉強をしなくてはならない, then the only way it makes sense is if he means “I” have to study every day. Now if his mother sees the report card and says the same thing, the only way it makes sense is if the mother is saying “YOU” need to study every day.
In cases where the subject of the sentence isn’t automatically obvious, it could be spelled out with a name or pronoun to make it clear.