Are both of the following sentences grammatically correct? When seems to make more sense because it's directly related to time, but you would always say "what time" rather than "when time" in other situations.
1. What is the best time to call?
2. When is the best time to call?
1. What is the best time to call?
2. When is the best time to call?