They are similar in the sense that both has a temporary effect om the solar disk which is called the photosphere. Also, both of these phenomenon exist due to the extreme magnetic energy that is created below the surface of the Sun. However, they are different in a number of ways. A sunspot would appear as a blotch that is dark on the photosphere since it has cooler temperature than the surroundings while solar flares exist as a very bright explosion of high amount of energy.