The one thing that the Amazing Spider-Man 2 and Spider-Man 3 had in common was plentiful amount of villains. The Amazing Spider-Man 2 had the Green Goblin, Rhino, and Elektro while Spider-Man 3 had the Sandman, Hob Goblin, and Venom.
The difference between the two movies is that the Amazing Spider-Man 2 did not try and force all three villains and have a backstory for each one condensed into a two hour movie.
[The Amazing Spider-Man 2](movie:508593) had Elektro, Rhino, and the Green Goblin. We have Max Dillon's story of how he was mistreated and misunderstood, and how he channeled that anger into becoming Elektro and getting back at those who wronged him. We did not get much of a story on the background of the Rhino, but we do know that he is a Russian, sponsored by the Osborne's, and may be part of the [Sinister Six](movie:1274281). The Green Goblin was Harry Osborne after he had taken an advanced serum that made Spider-Man who he is. Harry was dying from the same disease that his father died from. He killed Peter's love, and was sent to prison, where he met the guy who would help him form the Sinister Six.
Spider-Man 3 introduced us to the Sandman, the Hob Goblin, and Venom. The Sandman it was revealed was the driver of the man who shot Uncle Ben in the first movie. He was robbing stores because he needed the money to take care of his ailing daughter. At the end of the movie, he turns to good and helps Peter/Spider-Man take care of Venom. The Hob Goblin was revealed to be Harry Osborne, and as we knew from the previous film, he hated Spider-Man and hated Peter for being a friend of Spider-Man. At the end of the film, he also becomes good when he realizes that Spider-Man did not kill his father like he believed. Venom was a black goop that joined on Peter Parker when he had just broken up with Mary Jane. Venom eventually joins together with Eddie Brock, and becomes a killing force, only to be destroyed when Harry Osborne gives up his life to save Peter and Mary Jane's lives.