This is a question with a very complex answer that can be broken down into several different parts. Firstly, Amber was often distanced from the other characters on Buffy because she was more interested in her vampire side and the mythology surrounding it. This changed dramatically after she was turned into a vampire and began to develop feelings for Angel, which led to their breakup.
Secondly, Amber’s departure from Buffy coincided with a general shift in the show’s tone which saw it move from being a light-hearted supernatural series to something darker and more mature. Amber’s character didn’t fit in with this change, and so she was written out of the show.