Yes, it is a good idea to use sunblock while flying when you're sitting up there in the pointy end!
Ultra-violet radiation, the part of "sunshine" that can damage your skin, is more intense at altitude than on the ground for the simple reason that the higher up you go, the less of the Earth's atmosphere you have between you and the sun. So, more UV rays get through to you.
UV radiation can cause or contribute to skin cancers. It also affects certain cellular structures in the skin, resulting in faster "aging" of the skin: Leathery texture and premature wrinkles.
UV radiation can also damage the eyes, causing cataracts. (This happens over time, of course -- not from one exposure.) Untreated, cataracts can lead to blindness. Exposure to UV rays is also blamed for a number of other eye disorders, such as inflammations of the cornea, the iris, and the membranes that line the eyelids.
What to do:
For the skin, sleeves help.

So does sun block. Get some that's intended for use on the face. You can use this on arms and necks as well. (If you get "regular" sunscreen for your arms and neck, you'll have to get a second one for your face -- face sunscreen is usually anti-pore-clogging. Might as well use that kind for the whole works!)
For your eyes,

the World Health Organization (WHO) recommends wrap-around sunglasses, or sunglasses with side panels. And if you think that kind looks dorky on you -- only wear them in the cockpit, and switch to your "cooler" shades after you land.
