I've heard this question a million times, and each time there are 2 answers. The first answer is the one that most people want to hear: a few weeks. While technically a reef tank does begin the nitrogen cycle in the course of a few weeks, and is able to support most life, I would not consider it cycled. The initial cycle enables the tank environment to house living organisms without an extreme build up of ammonia or nitrite; both of which are deadly to marine organisms in small quantities. This does not mean that the tank is finished with the cycle. In fact, it has only just begun.
This is where the second and less favorable answer comes in. I would say that the cycling continues for about a year or so. There are many changes that take place after the nitrogen cycle gets up to speed. One such change is the release of silicon and phosphates from live rock and sand that were added to start the tank. This doesn't apply so much to cooked rock, but does apply to cured, uncured, and base rock. The first indication of the release of these substances is the growth of diatoms and different alga. The best known pest algae are green hair algae, green bubble algae, and bryopsis. The presence of any of these algae is a definitive sign that there are silicates and/or phosphates in the aquarium. The good news is that with regular 20%-30% water changes with RO/DI water and a quality salt combined with heavy skimming and small feedings if you have any fish in the tank, you can get these contaminates out and the algae will go with them.
A lesser known part of the new tank cycle is the the usage of alkalinity. It is consumed as it functions as a buffer to the acids produced by some facultative anaerobes and the acid production of many aerobees in systems where nitrate and nitrite chemistry is occurring. (thanks to TDWyatt for this tidbit) Simply put, the anaerobic bacteria that multiplied during the first few weeks of the cycle are now reducing the available alkalinity by producing acids while nitrifying. If you don't know, alk should be between 8 and 12 in a reef tank. Additionally, alk helps to stabilize pH and also helps with the uptake of calcium by corals and clams. Sometimes alk can be maintained by frequent water changes, but more than likely you will have to add alk in balance with calcium and magnesium. A search of the balling method will generate more detailed info on how to test for and replace any of these 3 parameters.
It literally takes a year to really have a stable tank, and depending on maintenance habits, filtration, and bioload, could take even longer. The best advice for any new tank owner is to research everything to death. If you want to be a successful reefkeeper, then you should learn as much as possible about the hobby. And don't be afraid to ask questions on a knowledgeable forum like The Reef Tank.