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.
Taxizentrale Heidelberg (German only), is an option. The “Halteplätze” section on their website has a listing of where their taxi stands are located throughout the city.