It must be perfectly fine if it's meant to draw figures and overall ideas about the solution. That's what whiteboards are for. Sometimes a picture's worth a thousand words, and drawing diagrams or illustrations is frequently indispensable for actually solving a complex problem (as opposed to having a picture in the head, or described in writing).
But I'd say it's borderline offensive to ask a person to write any realistic code (i.e. not very-high-level pseudocode that's more of a human-readable notes than something for a machine) on a whiteboard.
Never been to Google, so no idea what they ask for.