Inclusion Criteria:
* Pathologically confirmed non-small lung cancer; for patients in group 5, any solid tumor histology to be included
* Stage IV metastatic disease (only during the phase II)
* At least one thoracic or liver lesion amenable to radiation, for group 5 we need one area that can safely receive SBRT or WFRT, not restricted to lung or liver sites
* At least one additional non-contiguous lesion to the irradiated lesion amenable to radiographic evaluation
* Be willing and able to provide written informed consent/assent for the trial
* Have measurable disease based on immune related response criteria (irRC) criteria
* Have a performance status of 0 or 1 on the Eastern Cooperative Oncology Group (ECOG) performance scale
* Absolute neutrophil count (ANC) \>= 1,500 /mcL (performed within 28 days prior to study registration up to the first dose of study drug)
* Platelets \>= 100,000 /mcL (performed within 28 days prior to study registration up to the first dose of study drug)
* Hemoglobin \>= 9 g/dL or \>= 5.6 mmol/L (performed within 28 days prior to study registration up to the first dose of study drug)
* Serum creatinine =\< 1.5 X upper limit of normal (ULN) or measured or calculated creatinine clearance (glomerular filtration rate \[GFR\] can also be used in place of creatinine or calculated creatinine clearance \[CrCl\]) or \>= 60 mL/min for subject with creatinine levels \> 1.5 X institutional ULN (creatinine clearance should be calculated per institutional standard) (performed within 28 days prior to study registration up to the first dose of study drug)
* Serum total bilirubin =\< 1.5 X ULN or direct bilirubin =\< ULN for subjects with total bilirubin levels \> 1.5 ULN (performed within 28 days prior to study registration up to the first dose of study drug)
* Aspartate aminotransferase (AST) serum glutamic-oxaloacetic transaminase (SGOT) and alanine aminotransferase (ALT) serum glutamic-pyruvic transaminase (SGPT) =\< 2.5 X ULN or =\< 5 X ULN for subjects with liver metastases (performed within 28 days prior to study registration up to the first dose of study drug)
* International normalized ratio (INR) or prothrombin time (PT) =\< 1.5 X ULN unless subject is receiving anticoagulant therapy as long as PT or partial prothrombin time (PTT) is within therapeutic range of intended use of anticoagulants (performed within 28 days prior to study registration up to the first dose of study drug)
* Activated partial thromboplastin time (aPTT) =\< 1.5 X ULN unless subject is receiving anticoagulant therapy as long as PT or PTT is within therapeutic range of intended use of anticoagulants (performed within 28 days prior to study registration up to the first dose of study drug)
* Patients with brain metastasis will be included as long as they are free of neurologic symptoms related to metastatic brain lesions and who do not require or receive systemic corticosteroid therapy in the 14 days prior to beginning MK-3475 therapy
* Female subject of childbearing potential should have a negative urine or serum pregnancy within 72 hours prior to receiving the first dose of study medication; if the urine test is positive or cannot be confirmed as negative, a serum pregnancy test will be required
* Female subjects of childbearing potential should be willing to use 2 methods of birth control or be surgically sterile, or abstain from heterosexual activity for the course of the study through 120 days after the last dose of study medication; subjects of childbearing potential are those who have not been surgically sterilized or have not been free from menses for \> 1 year
* Male subjects should agree to use an adequate method of contraception starting with the first dose of study therapy through 120 days after the last dose of study therapy
* We will allow XRT prior to study entry to other sites, with no washout period, allowed prior to study entry as long as at least one measurable sites of disease is kept unirradiated
Exclusion Criteria:
* Is currently participating in or has participated in a study of an investigational agent (except glutamine) or using an investigational device within 4 weeks of the first dose of treatment or 5 half lives, whichever is shorter
* Has a diagnosis of immunodeficiency or is receiving systemic steroid therapy or any other form of immunosuppressive therapy within 7 days prior to the first dose of trial treatment; unless the steroid therapy is for physiological replacement
* Has a diagnosis of active scleroderma, lupus, or other autoimmune disease which by the opinion of the treating radiation oncologist precludes safe radiation therapy
* Has had prior radiation therapy to all available thoracic and liver lesions such that additional radiation therapy is unsafe by the opinion of the treating radiation oncologist
* Has had a prior monoclonal antibody within 4 weeks or 5 half-lives, which ever is shorter, prior to study day 1 or who has not recovered (i.e., =\< grade 1 or at baseline) from adverse events due to agents administered more than 4 weeks earlier
* Has had prior chemotherapy or targeted small molecule therapy within 2 weeks prior to study day 1 or who has not recovered (i.e., =\< grade 1 or at baseline) from adverse events due to a previously administered agent
* Note: Subjects with =\< grade 2 neuropathy are an exception to this criterion and may qualify for the study
* Note: If subject received major surgery, they must have recovered adequately from the toxicity and/or complications from the intervention prior to starting therapy
* Has a known additional malignancy that is progressing or requires active treatment; exceptions include basal cell carcinoma of the skin, squamous cell carcinoma of the skin, or in situ cervical cancer that has undergone potentially curative therapy
* Has known active central nervous system (CNS) metastases and/or carcinomatous meningitis; subjects with previously treated brain metastases may participate provided they are stable (without evidence of progression by imaging for at least four weeks prior to the first dose of trial treatment and any neurologic symptoms have returned to baseline), have no evidence of new or enlarging brain metastases, and are not using steroids for at least 7 days prior to trial treatment
* Has an active autoimmune disease requiring systemic treatment within the past 3 months or a documented history of clinically severe autoimmune disease, or a syndrome that requires systemic steroids or immunosuppressive agents; subjects with vitiligo or resolved childhood asthma/atopy would be an exception to this rule; subjects that require intermittent use of bronchodilators or local steroid injections would not be excluded from the study; subjects with hypothyroidism stable on hormone replacement or Sjogren's syndrome will not be excluded from the study
* Has evidence of interstitial lung disease or active, non-infectious pneumonitis
* Has an active infection requiring systemic therapy or hospital admission
* Has a history or current evidence of any condition, therapy, or laboratory abnormality that might confound the results of the trial, interfere with the subject's participation for the full duration of the trial, or is not in the best interest of the subject to participate, in the opinion of the treating investigator
* Has known psychiatric or substance abuse disorders that would interfere with cooperation with the requirements of the trial
* Is pregnant or breastfeeding, or expecting to conceive or father children within the projected duration of the trial, starting with the pre-screening or screening visit through 120 days after the last dose of trial treatment
* Has a known history of human immunodeficiency virus (HIV) (HIV 1/2 antibodies)
* Has known active hepatitis B (e.g., hepatitis B virus HBsAg surface protein antigen \[HBsAg\] reactive) or hepatitis C (e.g., hepatitis C virus \[HCV\] ribonucleic acid \[RNA\] \[qualitative\] is detected)
* Has received a live vaccine within 30 days prior to the first dose of trial treatment
* Symptomatic brain metastasis
* Has experienced a dose limiting toxicity on treatment with either prior radiation or anti programmed cell death 1 (PD-1) or programmed cell death 1 ligand 1 (PD-L1) inhibitor therapy