there is a tab on both sides of the connector. you need to be able to get your fingers in there and press them in to get pull the connector loose. easiest way i have found to do it is to very very carefully pull the rubber seal away from the edges so you can access the back of the light. from there look in the headlight assembly from the front. you will see a small square cutout next to where the bulb comes through, through the cutout you will see a metal wire, you need to get your finger on it (from the back) and push it towards the street, careful not to force anything because if you break the wire or its connection to the headlight your headlight is pretty much useless...

when you manage to get that wire down it will release the headlight bulb and you can pull the bulb, rubber seal and connector up towards you a little more, this will make it easier to get to those tabs to release the connector.

reassembly is easy, put the bulb in first (with the flat part of the base down, the pins on the back will be to the sides and top) put that wire clip back how it was (its easier if you look through the front of the headlight to see what you are doing) remember not to force anything too much

then put the rubber seal back on, TOP is written on it so you know how it goes back on, make sure all 3 pins on the back of the light are through the hole in the center make sure the sides are all firmly back in place

then you can plug in the connector

i agree with DW for most people its probably easier to actually remove the assemblies, i managed to change my headlight bulbs without even removing the battery or factory airbox but ive got small hands and have gotten good at contorting them to work on cars with as little disassembly as possible