Is it after you beat the game ? or at an early point ?
When you beat the Pokemon League, you unlock this item/place called "Pokeshifter" that lets you migerate from Diamond - HG/SS (Previous DS pokemon games only).
To answer your question properly, after you beat the Pokemon League. :D