This phase II trial studies how well radiation therapy with or without apalutamide works in treating patients with stage III-IV prostate cancer. Radiation therapy uses high energy x-ray to kill tumor cells and shrink tumors. Androgen can cause the growth of prostate cancer cells. Drugs, such as apalutamide, may lessen the amount of androgen made by the body. Giving radiation therapy and apalutamide may work better at treating prostate cancer than radiation alone.