Because of its desert location, the best times to visit the park are in spring (late March through mid-May), and fall (mid-September through November).
Spring brings the plants in the surrounding area to life (there are not many plants in the valley itself, and most of them bloom through the Summer). The area around Goblin Valley is rich in desert plants; early to mid-May appears to be the peak flowering time for most of them.
Summer brings the tourists and the heat. There is no cover in the valley except along the valley wall - it gets really hot in the desert sun!
Fall comes and the tourists (and extreme heat) leave. Peaceful, dry, and still warm.
Winter can be cold in the desert, though daytime temperatures are usually reasonable. Camping is Right Out, though, unless you have an RV.