Proton therapy is a type of radiation therapy that uses a beam of protons to irradiate cancerous tissues. In principle, it offers a physical advantage over conventional radiotherapy due to the very localized dose deposition of protons in the body, which can be exploited to decrease the dose received by healthy tissues, leading to fewer complications. However, this unique characteristic comes at the cost of high vulnerability to uncertainties, requiring extremely precise machinery from beam production to treatment delivery. Moreover, accelerating protons requires a heavier infrastructure than conventional radiotherapy, which increases the cost of proton therapy over photon therapy. This thesis aims at improving the accessibility, cost-effectiveness, and treatment quality of proton therapy by using data-driven approaches wherever they can bring added value. In the first part of this work, with the aim of improving equipment maintenance, we develop predictive maintenance solutions based on machine learning to detect incoming failures and decrease the overall system downtime. In the second part of the thesis, we concentrate on reducing the time needed to install a new proton therapy system by developing an automatic procedure based on mathematical optimization to speed up the calibration of a proton therapy beamline. The third and final part of the thesis is devoted to improving the treatment quality of mobile tumors in proton therapy. To achieve this goal, we develop a method based on a library of treatment plans that uses real-time information about the patient's anatomy via the acquisition of images to guide the treatment delivery.