A person could take a pill of vitamin D - particle - or they could expose themselves to sunlight, in which the UV spectrum - wave - is absorbed through the skin, and the body carries out a set of processes to convert the energy of that frequency into the chemical particle of vitamin D.
That's kind of a significant misrepresentation of the process. You don't take vitamin D from the light, the light just stimulates the chemical reaction that synthesizes it from cholesterol. You still need to ingest cholesterol to be able to synthesize vitamin D and the UV light simply provides some energy to do so. The light provides some additional energy to the reaction, but vitamin D is still created form the particles that are already in your body, not from the incoming light wave.