Eric Steven Raymond wrote a whole essay on smart questions and how to write them that can be found here
How To Ask Questions The Smart Way
While his essay goes over every single thing that you should know when asking technical questions there were a couple of key points. Some of those key points include trying to figure out the answer yourself before asking questions, asking questions in a relevant location, giving the important details and making it easy to respond to your question. There are many more things one should know but these basics get you the general idea for writing a smart question. By attempting to solve the problem yourself and then adding what you did in those attempts in your question you are more likely to get an answer to your question. This is because you will be seen as someone who is willing to put in the work and just having a little trouble vs someone who is just too lazy to find the answer themself. Picking the proper location to voice your question is very important because you need to ask the question to people who would have answers for it. If you asked a question about python in a forum about java you are unlikely to get an answer from someone very knowledgable in python and even if there is a person with that knowledge they are not on the java forum to answer questions about python. You need to ask the question in a way that makes it appealing to answer. Supplying the proper information and steps you have already taken to solve the problem make your question easier to solve and therefore more likely to be solved. On the opposite side leaving out important information and details will make your question less appealing and therefor less likely to be solved. Finally you need to make it easy for people to reply to your question or else people wont be able to help you even if they know the answer. By utilizing these ideas you will be able to create smart questions that will get smart answers.
Here is a smart question asked on the StackOverflow forum
Why is processing a sorted array faster than processing an unsorted array?
The asker wanted to know why piece of code they wrote in C++ ran faster when processing a sorted array over an unsorted array. We can confidently say this was a smart question by seeing if it contains those key points described earlier are present in this question. The person who asked the question stated that they thought the time difference might be stemming from a language or compiler anomaly so they rewrote the code in Java and the same problem. So they tried to fix the problem on their own and provided that information. That is a check for the first key point. They submitted the question on a forum called StackOverflow. This forum is designed to help people ask questions about coding problems so it is exactly the right location to ask this question. That is a check for the second key point. In the question the code in both C++ and java was provided along with the time difference in C++ between a sorted an unsorted array with runtimes as well. Other details about what the code was doing were also provided. So we can check off the third key point. StackOverflow has an easy was to respond to posted questions so we can also check off the fourth key point.
So we can safely say this is a smart question, but does that mean there were good answers delivered in a timely fashion. Well the question was posted June 27 2012 and the most upvoted answer was given that same day. Including that there have been a total of 25 answers most of which are saying the same thing, which is something about branch predication. Seeing as the first answer has 35000 upvotes and there are 24 other answers agreeing with it we can safely assume the answer is correct. That answer not only explains the problem but also gives the solution. So in less than a day a good answer was delivered in a timely fashion.