This is a diagram showing how atmospheres form.
Click on image for full size
The Origin of an Atmosphere
There are four ideas for where the atmosphere comes from:
1. that the planet-elements which made the planets made the atmosphere too, 2. that the atmosphere was drawn to the planet from the cloud out of which everything came, 3. that comets hit the planet and brought molecules of air with
them, 4. that volcanoes erupted and made an atmosphere.
The one that applies to Uranus is hypothesis #2, in which the original molecules, which Uranus drew out of the primitive gas cloud stayed, and form the atmosphere today.
You might also be interested in:

As shown in this picture, while they were forming in the solar nebula, the core of the planets-to-be drew material to themselves from the cloud of gas and dust around them. The bigger planets-to-be were
...more
Besides methane, Uranus' atmosphere contains even more complex molecules. These molecules form layers of smog over the clouds of Uranus, as shown in the picture.
...more
The mesosphere of Uranus is a region of balance between warming and cooling. That essentially means that nothing happens there. Except for diffusion, the atmosphere is still. Upper reaches of the atmosphere,
...more
As on Earth, the atmosphere of Uranus consists of a troposphere, stratosphere, mesosphere, and thermosphere. The troposphere is the region where the visible clouds are to be found. The stratosphere, as
...more
On Uranus, as on Jupiter, the winds in the belts and zones blow first in one direction, then in the other direction. The clouds rise up in a belt, and drop down in a zone, as shown in this picture. This
...more
The clouds on Uranus, like Jupiter, are divided into stripes. On Uranus the stripes are hard to find. The left picture shows the north pole of Uranus. In this picture only the smog can be seen. The clouds,
...more
The clouds of Uranus, made of methane crystals, are found very low in the sky, and are difficult to find beneath the hazey smog of the pla net. False color is used, in the picture of Uranus to the right,
...more