Safety must be the top priority when climbing the mast. On hot and sunny days, extra care must be taken while up there as the sun will fiercely beat down on you, causing all sorts of heat related problems. Climbing the mast is strenuous on its own, adding intense heat and sun to the mixture only compounds the difficulty.
One of the problems that can happen while aloft is passing out from heat exhaustion. If you pass out and are climbing the mast alone, you might be hanging there for quite some time which could pose a great threat to your life. Preparation is the key to safely climbing the mast in the heat of the day.
When you go up the mast, your entire world becomes restricted to what you have with you. If you are hungry and there is food in the galley, you have no food! You need to plan ahead and take everything you might need with you in your canvas bag: tools, lines, food, water, and anything else you might need.
Food is important to carry up with you as your blood sugar can drop from all of the effort involved in climbing. I like to carry honey nut snacks, as they give me a boost of sugars as well as protein to help fight off hunger. They are also bite size and won't get your hands dirty. This means that you can easily reach into the bag, grab a few, and eat them while you work aloft.
Staying hydrated is very important while up the mast. I carry 1L of water per hour I plan to be aloft, as well as an additional 250mL bottle, just in case I end up staying up there for longer than I intend. If I plan to be up there for an hour, I'll carry 5 bottles of water, and typically consume them all before I get back on the deck.
Another crucial component in the equation is clothing. You need to dress in clothes that will both keep you cool and protect you from the sun. I wear cotton shirts and pajama pants when going up. The light fabric keeps me cool while the long sleeves and pants keep the sun off of my limbs. They also protect me from the heat of the spars that have been roasting all day in the sun! A straw hat will keep the sun off your head and still allow air to flow through, keeping your head cooler than if you were exposed to the sun. Lastly, wear some good sunglasses; everything is white and the sun will be glaring into your eyes while you try to work.
If you have to be hot, sweaty, and baking in the sun, at least be as comfortable as you can with plenty of water, snacks, and shades.