
I find this fairly straight forward, yet I still trip up on it occasionally.
Sometime means eventually, an eventual future. Example: I will get to New York sometime next year. If you can substitute eventually and the sentence still makes sense, use sometime.
Some time means an unspecified amount of time. Example: I spent some time on the phone with her. In this instance, some is an adjective modifying time. If you can use another adjective and the sentence still makes sense use some time.
This is the same for other some words. Someday and some day.