Do coronal mass ejections and solar flares diffuse over long distances? I understand that over great distances electromagnetic radiation such as light and lasers would diffuse greatly (much like a shotgun blast). Is this the same case for solar flares?
If this is the case, how far would the Earth hypothetically need to be in order for a solar flare/CME to be "harmless"? (e.g. it won't affect any electronic equipment, barely affect the magnetosphere on Earth or to not have auroras in the night sky)
 A: 
If this is the case, how far would the Earth hypothetically need to be in order for a solar flare/CME to be "harmless"? (e.g. it won't affect any electronic equipment, barely affect the magnetosphere on Earth or to not have auroras in the night sky)

Most solar flares and coronal mass ejections are already effectively harmless to Earth.
It turns out that even for supernova, one can be relatively close and be effectively okay (e.g., see https://physics.stackexchange.com/a/233126/59023).
This is not to say everything is perfect or that we are not in any danger.  It's just that most of these phenomena are not strong enough to cause immediate or significant damage (e.g., see my answer at https://physics.stackexchange.com/a/258093/59023).  I personally would not want to be on the moon during an X-class flare, for instance, but Earth's atmosphere and magnetosphere protects us from most of the harmful radiation produced by these phenomena.

Is this the same case for solar flares?

Yes, this is a general rule for all point sources of radiation.
