Taxis in Heidelberg are available 24 hours a day, and can be found at several of the main squares. The main taxi station is at the Hauptbahnhof, and the other locations are the Bismarktplatz, Neckarmünzplatz and University Square. Calling and arranging to have a taxi pick you up is also an option.
The website, Taxi Zentrale Heidelberg, while only in German, does have some good information on it. You can find rates on the “Tarife” page, and on the “Taxi Halteplätze” page is a listing of where common taxi stands are located throughout the city.