Hampi Express that connects Bangalore and Hubli is a popular option to reach Hampi from Bangalore. The train passes via Hospet, the nearest railway station from Hampi. Both the up and down journeys the train covers in the night, and that is one of the reasons for its popularity.
There are no luxury buses connecting Bangalore to Hampi, only one Rajahamsa is available . If possible avoid roadways as its quite impossible to avoid road blocks near hospet.
Hampi is about 350 kms from Bangalore and the nearest railway station is Hospet which is just 13 kms from Hampi. If you are visiting only Hampi and therte about then using train as the mode of transport is the best option.