Why do some sentences have the subject marker and others don't? Can you omit it whenever you want or is it needed in certain sentences only?
It's probably best not to think of ‘o as a subject particle, it's really a proper noun determiner, but is only used when the proper noun is a subject.
In English proper nouns do not take articles, but standard nouns do take articles. So we use an article when we say, "The city is humid," but we don't use an article when we say, "Hilo is humid." It's similar in Hawaiian, but rather than leaving the determiner off, we use a special proper noun determiner ‘o. When there is a marker in front of the proper noun indicating its role in the sentence (so most of the times when it is not the subject), we leave the special proper noun determiner off.
Note that the ‘o determiner is also used with the pronoun "ia" ("he/she/it") and the question word "wai" ("who").