There are a few night direct buses from Bangalore to Badami. Both SRS & VRL operate non ac semi sleeper type buses from Bangalore. Check out with the agencies for the pick points in Bangalore, there are many, one would be closer to you.
Bus fare is Rs500-700 range. You can book seats online at their booking sites.
Bangalore Badami travel time is about 9 hours.
You may also want to check out the Bangalore to Badami trains options.