Might be The Sender (1998).
I remember that there was an alien female who was disguised as a human and for some reason she defected and was running with a human trying to prevent an invasion.
Alien disguised as human female, yes. No defection; she (Angel) is assigned to watch/guard a (human) widower, Dallas Grayson, and his young daughter Lisa, who respectively carry and manifest a special gene for a form of psychokinesis called sending. Lisa is kidnapped by a secret government/military project who want to exploit this power, and Angel helps Dallas try to rescue Lisa from that misuse through a long series of chases and fights.
At some point she said that she has to feed/recharge and lowered her disguise - at which point she became pitch black, still with a humanoid body and laid down on the back seat of the car while the man was driving. She explained to him that their race is so much more advanced and doesn't need anything else for food but just sunlight.
Yes, she 'feeds' off sunlight in the back seat of Dallas' convertible. This is established in dialogue, but in the DVD version I have we don't actually see her lying down and nudity is only implied; assuming you mean premium cable maybe that showed more. In the last scene we do see several others of her 'kind' as all-black and kind of Gumby-shaped (and apparently unclothed).
The movie was American. The setting was in some big city, L.A., N.Y. or similar but I can't remember which one exactly. They entered in a small spaceship at some point and were flying through the city skyscrapers. At the happy ending a huge alien mothership appears
All close. The setting is LA plus nearby roads and desert. She has a small flying 'ship' which is used only at low altitude and AFAICT not described as space-capable; they fly it back to central LA where they are chased around the skyscrapers by several villain helicopters, eventually shooting her ship down (into one of the flood-control channels that feature in seemingly all movies and TV shows set in LA). The alien mothership appears in the opening/prologue and the ending.
If so, this is the same movie as this other question