Technically, yes, you can close your eyes to sunbathe with daily contact lenses in. eye doctor or optician often told us never sleep with the contacts in. But they are never require you never close your eyes when you wear contact lenses. However, it is not good to enjoy sunbath with naked eyes. you'd better reduce the time of enjoying sunbathe when you close eyes with contact lenses in.
In common, people who enjoy sunbathe are suggested to wear sunglasses to shield their eyes. Personally, if you enjoy mild sunbath, it is ok that you close eyes to sunbathe with daily contact lenses. However, if the sun is very strong, you'd better not do that. Buy yourself a pair of sunglasses(prescription sunglasses are also available)
I kindly suggest you not to sunbather with the contacs in. Sunbathing can involve periods where your eyes are closed thereby possibly depriving the cornea of oxygen causing discomfort and further problems with the cornea. The eyelids are very sensitive and sunburn is therefore also a possibility.