If the Earth left the solar system for interstellar space. How long would it take for atmosphere to freeze? If the Earth left the solar system for some reason. Assuming its moving at the same velocity it's currently exhibiting. How long would it take for the atmosphere to freeze. Would we get methane clouds like Titan. Would there be an atmosphere or would it all be frozen on the ground? 
 A: If you could suddenly drop a big screen between the Earth and Sun, the initial rate of energy loss would equal the total solar energy input:
$$\frac{dE}{dt} = \alpha F A_e .$$
Where $\alpha$ is the mean albedo, which Wolfram puts at $0.37$, the flux is $F = 1400\frac{\text{W}}{\text{m}^2}$, and the radius of the Earth is $R_e = 6.4 \times 10^6\text{ m}$, I get $7 \times 10^{16} W$.
Now, the atmosphere masses roughly $5 \times 10^{18}\text{ kg}$ (Wolfram again), and the heat capacity of Nitrogen gas is $c_p = 30 \frac{\text{J}}{\text{mol K}} = 1070 \frac{\text{J}}{\text{kg K}}$. So the initial cooling will be around $1.3 \times 10^{-5}\text{ K/s}$, or about one Kelvin per day. That rate will drop by the fourth power of the temperature (use absolute units!). 
Things left unconsidered:


*

*I've neglected the oceans, and geothermal heat. Both effects will slow things down, the ocean considerable, geothermal, not so much. There is also a great deal of heat in the rock itself, but rock is a much better insulator than water, so it will have a smaller effect in the short term. Still, head into a deep mine or cave to stay warm, and watch out for the mineshaft gap!

*The heat of vaporization of water vapor and the heats of fusion of liquid water and carbon dioxide will slow things down while the phase transitions happen. There will be other phase transitions later on, but they won't matter to the frozen corpses...

*I've used a blackbody approximation which is surely not exact, but it should do for our purposes.


As Omega says in the comments all these factors are mitigating, and the real rate of temperature loss could be a factor of several (maybe even ten) lower than the above calculation. There are a lot of details that really matter, and things will change as the atmosphere changes (more clouds, then less, possible carbon dioxide clouds...) and the oceans freeze over.
However, the fact that the day/night temperature cycle is much larger than the daily change derived above suggests that the temperature near the Earth's surface is only loosely coupled to the mean atmospheric temperature (I guess that's not a big surprise as the surface is probably the warmest part of the atmosphere), so you can expect surface temperatures to drop much more rapidly than than the mean at first. How much faster? Well, like the day-to-night change initially, though I'd guess this will slow pretty quickly.
A: the Earth is emitting thermal radiation corresponding to its temperature, and losing the energy (and decreasing temperature) in this way. Normally, this is cancelled - every day or every year - by the energy coming from the Sun. The second term would be absent in your thought experiment.
So those 342 Watts per meter squared in average coming from the Sun (more precisely, only 250 or so because a part is reflected without any transformation of the energy form anyway, so it's like if it is not coming at all) would disappear from the budget. One needs to estimate the heat capacity of the atmosphere - and the relevant layers of the ocean that are capable to heat the atmosphere above it for a while. But you don't need to be that sophisticated. It's enough to look at the reality of weather - numbers that everyone knows.
In the continental climate, going from day to night lowers the temperature of the atmosphere by 1 Celsius degree in average (cloudiness makes the day-time difference smaller; sunny skies make it larger). Because what you say is just a permanent night, this rate of cooling would simply continue and continue. So the initial rate would be cooling by 1 degree per day or so; it would be slower above the ocean.
As the temperature of the Earth would be going down, the radiation would be dropping as the fourth power of the absolute temperature (in Kelvin degrees). The atmosphere would be getting cooler, partly condensed (if not frozen), and much thinner. So once the absolute temperature decreased by 20 percent (note that $1.2^4$ equals 2 or so) or about 50 Celsius degrees, the rate of cooling would drop to 1/2 of the original one. At any rate, you need a few months to get to minus 50 degrees or something like that. The ocean would still be oscillating for a long time and it would try to unmelt the thinner atmosphere right above it - just like the circulation of water beneath the ice in a pond. Note that deep ocean circulation takes 1,500 years or so. 
So of course, the ocean wouldn't freeze over for a very long time. But that's already a different question. Needless to say, heat almost doesn't get beneath the solid ground - kilometers below the rocks, they wouldn't notice that the Sun is gone for thousands of years or much longer.
Best wishes
Lubos
A: Velocity relative to where? Not that crucial though =)
It would take a matter of hours(maybe a few days) if you instantly take it to an empty space. It would take a few weeks if you gradually move away from the Sun. Let me note that as Noldorin said the only way of heat transfer is via radiation, but since Earth is a relatively good radiator, it would not take very long.
There would almost always be an atmosphere because there simply is enough gravity to attract gas, no matter what kind of gas it is. It will surely be dimmer&less dense though. There is not nearly enough methane on Earth to form a methane cycle similar to that of Titan. Titan possesses maybe hundreds of times more methane than Earth.
