Light-Controlled Magnetism and Magnetic Sensing in Two-Dimensional Vanadium Dichalcogenides and Related Semiconductors