I know that all surge protectors/upc's need outlets that are earthed and three pronged to safely protect against lightnings, but I would like to know if they can help against power fluctuations, even if its just by a little bit. I have started unplugging my computer during rain and storms but sometimes in my house the power fluctuates before any storm begins which causes my computer to shutdown or restart. So if a power surge can help in this situation then it would be worth it to me.
First, I'd suggest looking at Is is safe to plug a surge protector into a 2-prong outlet using a 3-to-2-prong adapter?. That may answer your question. I'd also suggest looking at the outlet box and seeing if it's already grounded, in which case you could just replace the outlet.
However, if it's protection against power fluctuations you want, I'd suggest a UPS, not a surge protector. They have an internal battery, and if you buy an Online/double-conversion UPS, the battery is always what's providing the power. They may well not like being without a ground.
Surge protectors are metal oxide varistors one is tied from hot to ground and another is connected from common to ground. They break down at specific voltages and dump the spikes to ground. To answer your question will they work with a 2 prong outlet NO there is no place for the spike to go. As Kevin said a ups would be the best way to go because of the isolation from the line voltage. Incoming line voltage is transformed. To the battery voltage and uses electronics to transform the dc back to AC when the power goes out the system keeps providing power using the battery until the battery is low on charge. The transformer is the key because this isolates the line voltage from the main the electronics create a new output, more expensive units create a pure sine wave less expensive create a sine wave that looks like small steps in the sine wave computers sometimes have trouble with the modified sine but many have become close to pure since and work well with computers and other digital equipment. Nothing other than unplugging will prevent damage of a direct. Or close lighting strike but these are rare. So to protect your computer 100% unplug. Close to 100% get a UPS. Because without a ground filters and MOV's won't work.