I interpretted mtoto as the subject: "Look, baby/child!" How does one tell whether mtoto is the subject or the object of the command verb?
Context. If you say it to a child, then that child is the subject of the imperative sentence. If you say it to a grown up, you are telling him/her to watch the child. Without context the sentence can mean both.
Is there a reason why mtoto has to be the subject here? Can't the sentence mean "Watch the child"?
No. The 'ni' ending is only for locatives, as when you want to express that something is happening at a place. "Angalia mtotoni" would mean something like "Watch at/in the children", which really doesn't make much sense. The object is (sometimes) marked on the verb. Not in this case though, since the verb is an imperative. If you change it to "Unamwangalia mtoto" - "You are watching the child", the "-mw-" part is an object concord, that shows the object to be of the group 1 singular, which include most nouns for people.
How would you say "Child, watch." if, for example, you were showing the child how to do something. Would it be this phrase or something else?