Coronal Mass Ejection and solar flare produced on the surface of the Sun often can cause disruption to our electronic equipments especially the communication service if it was directed towards Earth. However these solar winds carry enormous amount of energy and I believe we can use it to power spacecraft to reach distant places within the solar system and beyond. I'm envisioning a futuristic world where we deployed machines to capture these high energy charged particles to propel interstellar flights, the spacecraft will move even more faster than using a solar sail. Is such technology within our gasps in the coming decades? My future spacecraft would be running on hybrid engine fueled by both solar flare and nuclear fusion and since the size of CME is colossal we can have space travellers paying visit to these patrol stations for refill, but is it possible to contain the CME for long period of time?
The answer is "sort of".
The charged particles being ejected from the sun are the "solar wind", and in theory a magnetic sail could be used to intercept the wind and extract energy from it, providing a form of momentum exchange propulsion. The primary difference between a magnetic sail and the more familiar solar sail is the magsail is a loop of superconductor with a large current flowing through it to deflect the charged particles of the solar wind. As current superconductor technology is up to the task as yet, no prototypes or sample missions have been flown or are planned. (An introduction to the technology can be found here: http://www.esa.int/Education/Magnetic_sails)
A related technology is the electrostatic sail, which uses a fan of electrically charged wires to interact with the solar wind, providing the thrust for the spacecraft. The ESA is planning to conduct an experimental mission to explore the feasibility of electrostatic sail flight in space. (Introductory wikipedia article here: https://en.wikipedia.org/wiki/Electric_sail)
Since the solar wind is variable, a magsail or an electrostatic sail will have some different issues from a solar sail that uses light for thrust. This is where the idea of CME comes into play, since the effect on a solar sail will be minimal (the mirrored surface of a solar sail will not interact with the CME in any positive way, although the sail and rigging may become electrically charged), while magsials and electrostatic sails will be able to interact directly with the mass stream and receive a large energy boost. The problem is that CMEs are not predictable in time, direction or output, which means you will not be able to plan your trip to the outer solar system based on solar activity. The ship could adjust the magnetic or electrical field of the sail to take advantage of a CME event, but this would be more like the captain of a windjammer trimming sails for an oncoming storm rather than rigging to take advantage of the prevailing westerlies.
The other danger is that CMEs bring clouds of highly energetic charged particles, which would be a danger to the ship itself, particularly electronics and any biological payload (i.e. crew). Since the normal thrust of these types of sails is very small (estimated to be @ giving a mass/thrust ratio of 600 kg/N), spacecraft using them would be quite small and low mass structures, which limited amounts of active or passive shielding to protect against space radiation. The blast of energy from a CME might overwhelm any defences the ship has, possibly even burning out the power source or control electronics of the magsail or electrostatic sail, rendering the ship dead in space.