There are a few reasons why cats love to sunbathe.
Cats love to be warm
Cats enjoy basking in the sun because it is warm. The average body temperature of a cat is 102 degrees Fahrenheit, so they often seek out warm places to relax.
Domestic cats prefer temperatures ranging from 86 to 97 degrees Fahrenheit as their ideal room temperature. The sun’s rays on the cat’s fur keep them warm and comfortable.
This heat-seeking desire of cats is a big reason why cats also love boxes so much.
Sunbathing helps to conserve energy
Cats are very efficient creatures; one way they conserve energy is by sunbathing. As predators, cats save up for the short but intense bursts of energy needed to chase and capture prey.
When cats sunbathe, their bodies absorb the heat, which helps them stay warm without expending extra energy.
Cats love a good sleep
Sunbathing can be a very relaxing activity for cats. It gives them a chance to rest and rejuvenate their energy levels. After a long nap in the Sun, cats often feel refreshed and ready to take on the day.
Can cats get sunburnt?
Yes, cats can get sunburnt especially in areas like the ears, nose, and around the eyelids and lips where there is sparse or no fur. Cats with pale fur are especially susceptible to sunburn and can develop solar dermatitis that can eventually lead to skin cancer .
Sunburn can be very painful for cats and lead to serious health problems if left untreated. Always consult your vet if you are concerned about any health issues your cat may be experiencing.
Can I use sunscreen on my cat?
Sunscreen is typically not recommended for cats . Even sunscreens marketed as safe for larger animals like dogs and cats are not approved for cats.
The best preventative method is to limit the time your cat is exposed to the sun.
There are several health issues that can arise through the use of sunscreen on cats both through absorption into the skin and by ingesting during grooming. Cats will start grooming as a result of having sunscreen applied to them and this ups the amount of product a cat will ingest.
Sunscreens that contain the mineral zinc oxide can be absorbed through the cat’s skin and lead to zinc toxicity which can damage red blood cells.
Chemical sunscreens can also contained salicylates which is used to absorb UVB radiation from the Sun. Cats lack adequate pathways to metabolize salicylates which means it can take longer for the chemical to be processed out of the cat’s body and can lead to poisoning.
Propylene glycol is another common additive in sunscreen that is also toxic to cats.
Can cats create vitamin D from the Sun?
Unlike humans who can synthesize vitamin D3 from sunlight, cats have to get this vitamin from their diets.
Humans and many other mammals can use 7-dehydrocholesterol which absorbs UVB radiation which in turn is converted to previtamin D3. Research has shown that cats lack adequate 7-dehydrocholesterol concentrations naturally in their skin for vitamin D synthesis. 
How can I help my cat enjoy sunbathing?
If you want to help your cat enjoy sunbathing, you can do a few things. First, ensure your cat has access to a sunny spot in your home. Set up a comfortable cat window bed or blanket in a sunny spot near a window and encourage your cat to lounge there.
You can also take your cat outside on warm days and let them bask in the sun. Just be sure to keep an eye on them and bring them inside if they get too hot. Try to prevent your cat from sunbathing during the time of day when the sunlight is at its peak or during the hottest part of the day.
Sunbathing can dehydrate, so it’s important to ensure your cat stays hydrated. Finally, give your cat plenty of water to drink. Place bowls of fresh water in several places that your cat has easy access to.
 Dorn, C. R., Taylor, D. O. N., & Schneider, R. (1971). Sunlight exposure and risk of developing cutaneous and oral squamous cell carcinomas in white cats. Journal of the National Cancer Institute, 46(5), 1073-1078.
 Pets and sunscreen: Don’t get burned by the myths! (2019, August 7). ASPCA. https://www.aspca.org/news/pets-and-sunscreen-dont-get-burned-myths
 Morris, J. G. (1999). Ineffective vitamin D synthesis in cats is reversed by an inhibitor of 7-dehydrocholestrol-Δ7-reductase. The Journal of nutrition, 129(4), 903-908.