Sailors in those days would have been above deck and exposed to harsh elements on the open ocean for hours at a time. How did they treat sunburn and other exposure-related ailments?
The 17th & 18th century sailor and sea surgeon books I've read don't give much attention to sunburn which suggests that treatment of it (and similar problems such as windburn) was not formalized. The men may have had personal folk remedies, but I have not yet found any.
From what is said about sunburn, it almost sounds like a necessary evil at the beginning of a voyage. Once the sailor had become accustomed to being in the sun, he would not have to deal with the problem. (Think of people who work outdoors a lot like construction workers and landscapers. Their skin is fully acclimated to sun exposure.)
If the sunburn were bad enough, the ship's surgeon might get involved, using the typical burn remedies. These would include things like salad oil, butter, egg whites and ointments containing camphor. If you are interested in more detail on burn treatments with a few period accounts of sunburn, check out my article on burns from the golden age of piracy: http://www.piratesurgeon.com/pages/surgeon_pages/burns1.html