I read that carrots and parsnips can cause phototoxic reactions like a sunburn. Is this with raw carrots and parsnips, or cooked ones, or both?

Phytophotodermatitis. There are certain plants like parsnips, celery, lime and many others that contain natural furocoumarins (psoralens & angelicins) that after ingested can cause blistering skin reactions and sunburns if the skin is exposed to sunlight or a tanning bed (with uva light). Raw or cooked, they can cause the reaction either way. These plants are members of the apiaceae, rutaceae and moraceae families.
Those & many others. I believe the reactions occur primarily with the raw forms from chemicals in the leaves/roots/ flowers (queen anne's lace/wild carrot). Google the terms "phytodermatitis" & "phyto-photodermatitis" (the latter being a phototoxic reaction due to chemicals in the plants reacting with sunlight, the former being a simple contact dermatitis). Fortunately, not everyone reacts to each & every plant listed.