You should generally plan on making your initial call to the Class D tower when you are roughly ten miles out. Check the ATIS or AWOS first and let the controller know that you have listened to the current weather broadcast. Your initial call should follow this mnemonic: DDAA.