In general, the water on the surface of the ocean is warmer than at the bottom because it is heated by the sun. In the tropical Pacific, winds generally blow in a easterly direction. These winds tend to push the surface water toward the west also. As the water moves west it heats up even more because it's exposed longer to the sun.
Meanwhile in the eastern Pacific along the coast of South America an upwelling occurs. Upwelling is the term used to decribe when deeper colder water from the bottom of the ocean moves up toward the surface away from the shore. This nutrient-rich water is responsible for supporting the large fish population commonly found in this area. Indeed, the Peruvian fishing grounds are one of the five richest in the world.
Normally, strong trade winds blow from the east along the equator, pushing warm water into the Pacific Ocean. The thermocline layer of water is the area of transition between the warmer surface waters and the colder water of the bottom.
Because the trade winds push surface water westward toward Indonesia, the sea level is roughly half a meter higher in the western Pacific than in the east. Thus you have warmer, deeper waters in the western Pacific and cooler, shallower waters in the east near the coast of South America. The different water temperatures of these areas effects the types of weather these two regions experience.
In the east the water cools the air above it, and the air becomes too dense to rise to produce clouds and rain. However; in the western Pacific the air is heated by the water below it, increasing the buoyancy of the lower atmosphere thus increasing the likelihood of rain. This is why heavy rain storms are typical near Indonesia while Peru is relatively dry.