Yes, it's generally safe to take a taxi at night in Bangkok. Taxis are available 24/7 and drivers are required to use meters. Your best bet is to use the Grab app to order a ride so that it will be tracked by GPS, and you can ensure you're getting a highly-rated driver.