The wrinkly skin that occurs to your fingers and toes after prolonged exposure to water, such as when you take a bath, is a temporary skin condition, sometimes referred to as water aging. The outer layer of the skin, known as the epidermis, is made up of cells called keratinocytes which form a tough intracellular skeleton made up of a protein called keratin. When soaked in water, the keratin in the skin absorbs it and swells, increasing the surface area of skin. To compensate for this, the skin wrinkles.
The reason why this only happens to your fingers and toes is because the skin is thicker than other parts of your body, due to the wear and tear these areas are subjected to. Other areas of the skin also swell, but the appearance is smoother. A waterproof layer of oil at the top of the skin, and the nature of our selectively permeable skin, prevents the body from blowing up like a balloon.
Your hair and nails contain different types of keratin and also absorb water, which is why nails soften after being soaked in water.