Although you will have to change two trains you can reach Coonoor from Bangalore by train. There are frequent trains from Bangalore to Erode from where Nilgiri express starting from Chennai is available to Mettupalayam. From Mettupalayam the passenger Nilgiri mountain railway train will get you to Coonoor.
There are many buses connecting Bangalore to Coonoor. There are premium and express buses starting from MCTC to Ooty bus stand from where Coonoor is just 20 kms.
Public transport is readily available from bangalore to Coonoor and you need to take your own vehichle only if you have to. Local taxis are avilable in Coonoor for sightseeing in Coonoor.