The term isn't necessarily bad in Japan. In fact a lot of people use the term proudly, but because of misinformation it is often looked down upon. In reality otaku just means you have an obsession with a particular subject. However, in western culture
we use it to describe a strong interest in anime/manga/video games.
In Japan the term has been abused by the media when describing people with an extreme, and often sickening, obsession with a topic. Such as the "otaku murderer" or the news reports of middle aged men collecting perverted dolls and marrying fictional characters.
Over the past few years the true meaning of the term has become more and more known so the negativity is slowly fading out.