Pharmaceutically active compounds (PhACs) are not efficiently removed in wastewater treatment plants and are released into surface waters resulting in toxin accumulation. The aims of this study were to investigate the effect of solar irradiation on PhACs in wastewater using immobilized TiO2 present as a catalyst, and to study the potential of this photocatalysis technique as a post-treatment process for wastewater effluent. We treated a mixture of PhACs spiked in wastewater effluent and in deionized water as a control with simulated solar irradiation for 96 h. Experiments were conducted with immobilized TiO2 (photocatalysis) and without (photolysis). First, TiO2 was successfully immobilized on 200–500 µm sand by using a sol–gel method. The photocatalysis resulted in high removal efficiencies for poorly biodegradable PhACs in wastewater effluent: 100% for propranolol, 100% for diclofenac, and 76 ± 3% for carbamazepine. Photodegradation of all four PhACs followed pseudo-first-order kinetics, and the kinetic constant of photocatalysis was much higher than that of photolysis in the absence of a catalyst. Dissolved organic matter (DOM) in wastewater effluent enhanced photodegradation of PhACs by producing reactive radicals. However, at the same time, DOM inhibited photodegradation, possibly because DOM reforms the oxidation intermediates of PhACs into parent compounds. From an application perspective, water depth was confirmed as a key factor in photodegradation of PhACs due to light attenuation by modelling and experimental results. In addition, after photocatalysis, toxicity of PhACs decreased and biodegradability of wastewater effluent increased slightly. In conclusion, the technique is a promising post-treatment process to improve water quality, prior to discharging to natural waters or to polishing water treatment systems such as wetlands and lagoons.