This phase I trial studies the best dose of vemurafenib when combined with whole brain radiation therapy (WBRT) or stereotactic radiosurgery (SRS) in patients with v-raf murine sarcoma viral oncogene homolog B (BRAF) mutation-positive melanoma and brain metastases. Radiation therapy is an effective treatment for patients with brain metastases. Patients with multiple metastases are typically treated with WBRT. For patients with a few metastases, SRS alone can be used. Vemurafenib may stop the growth of tumor cells by blocking some of the enzymes needed for cell growth. Combining radiation treatment with vemurafenib for melanoma patients with brain metastases may result in improved local control and prolonged survival.