If safe to do so pull out a little way into the intersection but turn your vehicle so that you pull out in front of the car or vehicle next to you.
Pull out just enough so that the ambulance or firetruck can get by you.
If it's safe then proceed through the intersection but if not stay put as the ambulance and firetruck will not force you out into the intersection if they've been properly trained.
Sometimes an ambulance and firetruck will be able to change the red light to green so be prepared and keep an eye on the light because it may change to green sooner than you expect.
Professional Firetruck and ambulance drivers are also trained to navigate around your vehicle by jumping medians and other obstacles if needed.