The observation deck of the Petřín Tower offers a magnificent view of Prague.
The upper deck has better views, but it's all behind glass. Since getting rid of reflections might be tricky, it's better to try an alternative: there are few windows that can be opened (not sure if allowed in a colder weather though). Or, just before you reach the upper deck (or after you leave it), you can photograph directly from the staircase. Note though, that it's quite narrow and this might get tricky when it's crowded there.
The lower deck has a slightly restricted view by the trees around the tower. On the other hand, there's an open-air terrace around this whole deck, which makes it usually somewhat more relaxed.
Crowds here depend on the time of year, there can be a lot of people on a sunny day, even late into evening. But usually it's manageable.
When to come: The tower doesn't open until 10am, so morning photography is ruled out. This leaves evenings as the best time, either during an interesting sunset or somewhat later, up to an hour after sunset, when all the lights are on and all the major buildings illuminated. As for time of year, I prefer when the trees around the Petřín Tower are green, i.e. starting from mid-April. However, winter photographs with some snow might be pretty good too.
Tripods are not allowed. Even if you tried to use one, the space is mostly quite limited and also -- the higher you are, the more vibrations are there in the tower, caused both by wind and other visitors running around, so tripod usage would often result in blurry images anyway.
Lens: either wideangle to capture the whole panorama, but better to use something in 24-35 mm range and then merge the panorama in post-process. Telephoto might be used to focus on individual features of Prague. For evening photography without a tripod, lens (or body) with vibration reduction technology is very useful. Together with a bright lens and camera that doesn't introduce too much noise when you push the ISO, you can create reasonably sharp images quite late into the evening.
Getting there: Check out the Petřín Tower Photography Guide for more information, opening times, etc.