||Disclaimer: I only have a short experience as an interviewee for software engineer internships, other roles may have different expectations.
I applied and got internship offers from Google and Facebook. Based on my interviews and the advice I read about interviewing with these type of companies:
1. Are we expected to write comments for the code?
No. However, code quality is also valued. Structuring the solution in functions (or classes if it is a high level question) and using meaningful variable names is good. If the interview is on a whiteboard, it's normal to use shorter names to write less.
2. Should I write driver methods (main) or stand-alone functions are sufficient?
Usually, the questions are more like "Write a function that given X, does Y". No main() or testing code required.
3. Should I explain my solution as I am coding or can I leave the explanation until the end?
Coding takes a lot of interview time. It's better to discuss the solution ideas before coding. The goal is to make sure you're going in the right direction before coding the solution. Then, explain what you're doing while coding.
If it's something really simple like a warm-up question, say reverse a string, then I think it's ok to write code right away (but explain what you're doing).
4. How much emphasis is given to the coding speed?
Speed matters, but I think it's more about the time taken to solve a question rather than coding speed.
It's more like "This candidate spent the whole interview on the FizzBuzz question, reject" vs "The candidate was able to progress until here, discussing X, Y and Z".
The interviewers typically have asked the same questions to a lot of people. So, the interviewee performance is compared with the past applicants.
I recommend watching this video where a Facebook engineer goes through an interview question and gives tips. There are also a lot of questions about preparation and tips on Quora.