Seattle, WA
You can, but ladder-based cleaning on upper floors is one of the more common ways homeowners get hurt doing their own exterior maintenance. A purified water-fed pole system reaches most second-story windows safely from the ground, which is why professionals default to it instead of a ladder.
Because the pole extends and the brush does the scrubbing, there's usually no need to get on a ladder at all for second-story glass.
Unusual window placements or very tall sections occasionally still call for ladder work, which is one more reason to have a professional assess the job first.