Buy a Cap. A simple ball cap is the single best way to protect your scalp from the sun. Wear one every time you're going to be in the sun for more than a few minutes. Remember to make sure the cap covers the top of your head! A visor will do absolutely nothing to protect your scalp from the sun. Golfers, are you listening?!
Use Sunscreen. A spray-in sunscreen is handy for hitting those thin spots at the crown (anywhere on the head where you can see scalp). There are several sprays on the market, but my favorite is HeadBlade's HeadLube SPF 30 -- it's non-greasy and doesn't smell like a coconut. I just spray a few pumps on the thin spots and rub it in a little. This actually doubles as my styling product when I'm in the sun without a hat.
If you do burn your head, you'll need to treat your sunburned scalp. Gently shampoo you hair and apply a bit of moisturizer to your scalp. Ibuprofen can help ease the pain (make sure your doctor says it's okay for your to use Ibuprofen). Avoid blow-drying, hard combs or brushes, and don't use products that contain alcohol -- these will all make the drying and peeling worse. If your scalp does peel (and it likely will), don't panic -- it's not dandruff. Avoid picking at the scalp to reduce risk of infection.
Now, go have some safe fun in the sun!