In my opinion, “I didn’t know to [verb]” has the same meaning as “I didn’t know I was supposed to [verb].”
This is most applicable to children who are still learning about life. It means the speaker was unaware of a societally expected reaction to a given event. This is only valid with proper context, and makes no sense as a stand-alone sentence.
For example: “When I was 4 years old, I ran across the street and almost got hit by a car. I didn’t know to look both ways before crossing.”
Source: Native AE speaker here.
Note: The sentence “I didn’t know to drive” still does not make sense to me, because I cannot think of a situation in which someone would not realize they would be expected to drive.