Kochi is better as rainfall in Kerala is generally pours. This is assuming you actually want enjoy rains, in spite of the associated discomfort. Monsoon in Kerala is something a nature lover will thoroughly enjoy. Later part of June onwards is when the rainfall is heavy.
Weekend getaways from Bangalore - there are plenty. Better check out the weekend getaway section of holidayiq.com.
Both Kochi and Yercaud will have their own charm in the rains.
Yercaud being a hill station will naturally be misty with lots of streams and waterfalls, hence perhaps more attractive. Check for landslides during heavy rains.