Great question, and it's important to do it safely. Here are some tips:
First, use a ladder to reach high places, and make sure it's stable and on level ground. Wear shoes with good traction to avoid slipping.
Second, always use outdoor extension cords and lights that are specifically designed for outdoor use. Use a circuit tester to check that the outlets are working properly.
Third, use a timer to control when the lights come on and off, and make sure they're unplugged when you're not home.
Finally, check the weather forecast before you start, and avoid doing it during windy or wet conditions.