An interesting verse, and one that has a couple of dimensions.
Firstly, the context of this verse was during the time of the prophet where the prophet was being bombarded with a lot of unnecessary questions that were not relevant to day-to-day islamic law. The example given in an oft-cited hadith, involved many people asking the prophet who their father was, and when the prophet told them, they were upset. So in this context, the message "if you think the answer to your question will upset you, don't ask" - makes sense.
Yusuf Ali provides a more metaphysical explanation in his meaning of the Quran:
Quote:Many secrets are wisely hidden from us. If the future were known to us, we need not necessarily be happy. In many cases we should be miserable. If the inner meaning of some of the things we see before our eyes were disclosed to us, it might cause a lot of mischief. Allah's Message, insofar as it is necessary for shaping our conduct, is plain and open to us. But there are many things too deep for us to understand, either individually or collectively. It would be foolish to pry into them, as some people tried to do in the time of the Prophet. Where a matter is mentioned in the Quran, we can reverently ask for its meaning. That is not forbidden. But we should never pass the bounds of (1) our own capacity to understand, (2) the time and occasion when we ask questions, and (3) the part of the Universal Plan which it is Allah's purpose to reveal to us.
The second dimension of this verse relates to the more mundane matters of day-to-day living and the specific obligations of muslims. Another relevant hadith relates a man who asked the prophet if the hajj must be performed every year - since the quran only says it is obligatory, but doesn't say how often. The prophet replied no, it doesn't have to be performed every year, but chastised the man and explained that had he could have obliged him to make something obligatory, when it needn't have been. Thus, so says another hadith:
"The worst criminal among the Muslims is the one who inquired about something which had not been made unlawful, and then it was declared so, because of his inquiry."This article explains this point further:
Quote: In matters where the Law-giver has chosen to lay down certain injunctions only broadly, without any elaborate details, or quantitative specifications, He has done so not because of neglect or forgetfulness. Such seeming omissions are deliberate, and the reason thereof is that He does not desire to place limitations upon people, but prefers to allow them latitude and ease in following His commandments. Now there are some people who make unnecessary inquiries, cause elaborately prescribed, inflexibly determined and restrictive regulations to be added to the Law. Some others, in cases where such details are in no way deducible from the text, resort to analogical reasoning, thereby turning a broad general rule into an elaborate law full of restrictive details, and an unspecified into a specified rule. Both sorts of people put Muslims in great danger. For, in the area of belief, the more detailed the doctrines to which people are required to subscribe, the more problematic it becomes to do so. Likewise, in legal matters, the greater the restriction, the greater the likelihood of violation.
Thus, islamic law is in many respects deliberately vague in order to provide flexibility. However if the prophet is pushed with unnecessary enquiries about the specifics, then his hand may be forced, and be obliged to create further restrictions where it needn't have been created.