Energy spectrum and wave functions are obtained numerically with a potential consisting of Woods–Saxon, Coulomb, and spin–orbit coupling parts for the nuclei 15O, 15N, 17O, and 17F. The radial parts of the wave functions are used to calculate some matrix elements of electromagnetic transitions. These results are applied to calculate half-lives of low-lying exited states in the one-particle 17O and 17F as well as in the one-hole 15O and 15N isotopes. The calculated half-lives are compared with available experimental and theoretical results based on harmonic oscillator wave functions and Weisskopf units. In comparison with the results calculated from the other methods, our results based on the Woods–Saxon potential indicate a satisfactory agreement with accessible experimental data.