It was Johannes Kepler who first noticed the effect when he realized that, contrary to expectations, comet tails always point away from the sun. Kepler correctly surmised that pressure from sunlight creates these tails by blowing dust and ice crystals in comets away from the sun.

