The nearest stretch of seaside to Bangkok is probably Bang Pu Seaside Resort (สถานตากอากาศบางปู) in Samut Prakan. Don’t go there expecting beaches as it is only mudflats and mangroves. However, in Bang Pu they have a pier where hundreds of local people go to enjoy the cool evening breeze.
During the relatively cooler winter months between November and March, thousands of seagulls migrate here from Siberia. Local people like to go to Bang Pu Seaside Resort to feed the birds. The best time of day is during the late afternoon just as the sun is about to set.
This is where I went this afternoon to take some pictures of people feeding the birds and also of the setting sun. Next to the pier there is wildlife sanctuary which has bird watching towers. There is also a footpath along the coastline which you can explore. I have done it a couple of times and it takes about four hours.
There are several places at the pier where you can enjoy a meal while watching the sunset. If you are ever planning on going to Ancient Siam (formerly known as Ancient City) then it is worth going a further ten minutes down Sukhumwit Road to this resort. There are no direct buses from Bangkok. However, metered taxis do come out this far. Or catch a bus to Samut Prakan and then change to a songtaew or bus heading towards Klong Dan.