Wash the walls and ceiling around the skylight before painting. Even the smallest amount of dirt or debris left on the wall will cause air bubbles to form under the paint, which will lead to peeling. Spray the wall with an all-purpose cleaner, then wipe the wall down from ceiling to floor with clean rags.
Apply waterproof caulk all the way around the skylight. Moisture seeping through tiny gaps between the skylight and the wall causes bubbles, and caulking the skylight creates an impermeable barrier that will keep your walls dry. Apply a thin line of caulk around the inside of the light, and press the caulk down into the space with your fingers.
Prime the wall to prevent paint from peeling. After installing the light, paint carefully around the skylight with an interior wall primer, taking care not to skip any spots. Let the primer dry completely before applying the paint of your choice.