It was a mixture of various reasons, although for the Spanish and Portuguese it was a question of reaching India for spice trades after the embargo instated on them by the Ottoman Turks.
The Portuguese went around Africa, and the Spanish tried sailing west across the barren ocean, and accidentally discovered America through Columbus.
This impacted the power of the roman catholic church by calling the people to pray, aswell as organizing religious trecks and creating a petition to stop the pestilence