This randomized clinical trial studies radiation therapy and MK-3475 in treating patients with head and neck cancer, kidney cancer, melanoma, or lung cancer that has returned, has spread to other parts of the body, or cannot be removed by surgery. Radiation therapy uses high-energy x-rays to kill tumor cells. Monoclonal antibodies, such as MK-3475, may block tumor growth by targeting certain cells and causing the immune system to attack the tumor. Studying the effects of MK-3475 with radiation therapy on the body may help doctors learn whether it may be an effective treatment for these solid tumors.