Depends on your budget and kind of trip.
If it is a bachelor's trip with party and other fun ,I would highly recommend to spend more days in Pattaya.
3 nights Pattaya and 1 night Bangkok . It doesn't mean Bangkok had no party but not up to Pattaya and Bangkok is bit more costlier. Family trip 2 nights in Pattaya and 2 night in Bangkok.
Better avoid going with family 🤪