Jamie Foxx certainly is a very good actor with a big enough name draw who is no stranger to action-based movies. My question is, considering Electro is considered to be on a B-list villain for Spider-Man--a very high B-list, but B-list all the same--is it a part that can carry the movie as the main villain? Granted, if the sequel takes it's inspiration from Spectacular Spider-Man in that it re-creates Electro as a tragic villain who--due to changing into a being of pure energy and forced to be in a containment suit, no longer able to experience touch or taste or smell--gradually becomes more and more unhinged, it might work, especially with Foxx's performance.
Although, something tells me one of the reasons the filmmakers also decided to go with Electro is because having a guy cast lightning bolts and energy blasts from his fingertips are some of the easiest, and therefore cheapest, special effects to make. After all, there's plenty of people on Youtube who make videos of themselves casting Force Lightning using nothing more than Adobe After Effects.
(Although, to be fair, they are more talented than myself since I don't have or know how to use Adobe After Effects)