“When can I” is the correct structure when you are asking a direct question. When asking a direct question you always change the order of the subject and the main verb.
“…..when I can” could also be correct if the question is an indirect question. An indirect question has some additional words before “when I can” and is a way to be more polite in English.
When can I go out with my friends?
Would it be possible for you to tell me when I can go out with my friends?
Notice that both examples have the same intention but the second example adds extra information.
When can I?
“When can I?” is correct when it comes at the beginning of the sentence.
When can I take the train?
When can I start a business?
When can I buy some beer if I have no ID?
When can I find a nice girl?
When I can?
“When I can” is correct when it forms part of an indirect sentence.
Do you know when I can start the project?
Can you tell me when I can fly again?
Do you mind telling me when I can find a tennis court that is open?
Could you tell me when can I fix my phone?
Would it be possible to know when can I see a doctor?